Unity Auth: "Curl error 60: Cert verify failed"


I’ve implemented your Unity Authentication Beta service into my project, but unfortunately I can’t use it at this point because of this error:

Unity Curl error 60: Cert verify failed: UNITYTLS_X509VERIFY_FLAG_USER_ERROR1

It’s 100% repro on Galaxy S4 KitKat during:

await AuthenticationService.Instance.SignInWithGoogleAsync(_UserIDToken);

with project built using Unity 2020.3.25.

The error is thrown from:

Is there anything I can do from my end? The minimum supported API level has to be 19. If you do not plan to support older APIs, then please state the minimum supported API level in your documentation, so we can look for other solutions if neccessary.

A little update, on Unity 2019.4 the error looks like this:
Unity Curl error 51: Cert verify failed: UNITYTLS_X509VERIFY_FLAG_EXPIRED

Hi there,

Thanks for posting your code and the error details.

The minimum supported API level stated in the Unity Editor is API 19, but we are seeing reports of this error with the Authentication package on Android devices less than API 25.

The team are investigating this ane we will update this and other related documentation and threads when we have more information or a resolution.

In the meantime, I think we may be limited to API 25 or above.

Well that is unfortunate.

In the meantime, I’ve made an ugly workaround involving copying of Auth and Cloud Save packages into Assets, modifying the packages to work within Assets and adding a custom CertificateHandler to the WebRequest with different handling for APIs 19-24.

Small tip: when making changes to packages, it’s simpler to just copy it directly to your local Packages folder and make your changes there. Local packages always take precedence over the manifest.