coolishbee / universal-sdk-unity

The Universal SDK for Unity provides a modern way of implementing Social Login APIs.
45 stars 12 forks source link

Android error login for Facebook and Google #46

Closed futer24 closed 1 month ago

futer24 commented 5 months ago

Hello!

I have configured Universal SDK and when building on Android, I have no problems logging in with Facebook or Google. However, when uploading it to Google Play, both fail:

Google:

Unity Error Error login, code: 7002, message: Login Failed. (10)

Facebook:

com.facebook.GraphResponse Error {HttpStatus: 400, errorCode: 190, subErrorCode: -1, errorType: OAuthException, errorMessage: Invalid OAuth access token signature.}

Is there any difference between compiling the AAB for Google Play or an APK that would work differently?

Thanks in advance! Oscar

coolishbee commented 5 months ago

Thanks for the report. It's the same issue as #23 Facebook probably has the same issue. It seems like the certificate is not correct, so check the hash of the certificate.

futer24 commented 4 months ago

Hello!

I am not using Firebase.

Google:

I added already the Google Android credential and used the id instead the id web one, the problem persist.

Facebook:

I checked the certificate, reseted the client token, checked the hash, and nothing...

Thanks!

coolishbee commented 4 months ago

firebase and google api console are connected. To use Google login even if you are not using Firebase, you must register the Android oauth client ID and the sha-1 of the certificate in the Google API console. The important thing here is that when you upload an app to the Google Store Console, the certificate fingerprint is obfuscated. Therefore, you must additionally register either obfuscated sha-1 or sha-256. Even if you do not use the Firebase product, these processes are convenient to use through the Firebase console, so I guided you through them that way.