google-services
google-services copied to clipboard
OnActivityResult not called when using requestServerAuthCode
Here is my device:
- Device: Huawei Mate 10
- OS version: 8.1.0
- SDK version: 26/27
- [Android] Google Play Services version: 14.3.66 (040408-213742215)
Steps to reproduce:
- use requestServerAuthCode when building GoogleSignInOptions
- Choose one of your Gmail Account
- After pressing allow, the dialog will show again to ask for permission and it will continue to loop.
Observed Results:
After pressing allow, onActivityResult was not called at all, but if I press deny It will call my onActivityResult with result CANCELLED
Expected Results:
- What did you expect to happen?
Relevant Code:
GoogleSignInOptions gso = new GoogleSignInOptions
.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestScopes(new Scope("https://www.googleapis.com/auth/gmail.readonly"))
.requestServerAuthCode(serverClientId, true)
.requestEmail()
.build();
GoogleSignInClient client = GoogleSignIn.getClient(MainActivity.this, gso);
startActivityForResult(client.getSignInIntent(), SIGN_IN_INTENT_CODE);
The same thing happened in my device when requesting offline access
- Device: OPPO F1s
- OS version: 5.1
- SDK version: 22
- [Android] Google Play Services version: 14.3.66 (040408-213742215)
Cuu Hộ Giao Thông, cứu hộ oto
Relevant Code:
GoogleSignInOptions gso = new GoogleSignInOptions .Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestScopes(new Scope("https://www.googleapis.com/auth/gmail.readonly")) .requestServerAuthCode(serverClientId, true) .requestEmail() .build(); GoogleSignInClient client = GoogleSignIn.getClient(MainActivity.this, gso); startActivityForResult(client.getSignInIntent(), SIGN_IN_INTENT_CODE);
Link account
google-services/ios/signin/SignInExampleSwift/AppDelegate.swift
https://www.googleapis.com/auth/gmail.readonly
Is this issue still happening? Can anyone provide a working code example in a gist or repo that contains the looping behavior?