google-signin-unity icon indicating copy to clipboard operation
google-signin-unity copied to clipboard

Recent migration attempt

Open Thaina opened this issue 8 months ago • 15 comments

Since there is deprecation and migration recommendation from signin system

: copied from readme >

https://developer.android.com/identity/sign-in/legacy-gsi-migration https://developers.google.com/identity/sign-in/ios/quick-migration-guide

Thank for ios fix which was cherrypicked from this fork : https://github.com/pillsgood/google-signin-unity

Android was migrated to use CredentialManager and AuthorizationClient since GoogleSignInAccount was deprecated

However, GoogleIdTokenCredential actually not provide numeric unique ID anymore and set email as userId instead, so I have to extract jwt sub value from idToken (which seem like the same id as userId from GoogleSignIn of other platform)

Tested in unity 2021.3.21 and unity 6000.0.4

Add UPM dependency with branch tag https://github.com/Thaina/google-signin-unity.git#newmigration

{
  "dependencies": {
    "com.google.external-dependency-manager": "https://github.com/googlesamples/unity-jar-resolver.git?path=upm",
    "com.google.signin": "https://github.com/Thaina/google-signin-unity.git#newmigration",
}

Thaina avatar Jun 10 '24 11:06 Thaina