Android Google Auth Sign In get Id token handleSignInResult:false

后端 未结 4 874
隐瞒了意图╮
隐瞒了意图╮ 2021-01-20 07:41

I am setting GoogleSignInOptions and Google Api Client like this

    GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SI         


        
相关标签:
4条回答
  • 2021-01-20 07:55

    I believe that you need a call to client.connect(); as per documentation example:

    GoogleApiClient client = new GoogleApiClient.Builder(this)
             .addApi(Plus.API)
             .addScope(Plus.SCOPE_PLUS_LOGIN)
             .setAccountName("users.account.name@gmail.com")
             .build();
     client.connect();
    

    Or is it missing from your question and you are calling connect somwhere else in your code?

    0 讨论(0)
  • 2021-01-20 07:57

    Are you getting error 12501? I also had this issue because I was using debug.keystore which comes with the SDK (for some reason unknown to me, it didn't work). I created a new one on my own, got SHA-1 hash from it, entered in Google API console and then it worked.

    Be sure you set up signing configs for both debug and release builds with the new keystore.

    0 讨论(0)
  • 2021-01-20 07:57

    I am also facing the same issue.First remove the current OAuth client ID,after that create one more OAuth client ID.Its worked for me.

    0 讨论(0)
  • 2021-01-20 08:07

    Follow all the step!!..

    Release APK and debug APK has different SHA1 and different API keys for google services. Both of them must be added in Firebase Console -> Project settings. Then download google-services.json from here, add it to project and recompile with release keystore using the option "Build signed APK". That should work

    and also read carefully...

    https://developer.android.com/studio/publish/app-signing

    0 讨论(0)
提交回复
热议问题