Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only Id Token is null while signing via Android , IOS is working fine. #147494

Closed
thufail14 opened this issue Apr 28, 2024 · 3 comments
Closed

Only Id Token is null while signing via Android , IOS is working fine. #147494

thufail14 opened this issue Apr 28, 2024 · 3 comments
Labels
in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Comments

@thufail14
Copy link

Steps to reproduce

  1. Click on the sign in button via an android phone.
  2. Returning only ID token as null.

Expected results

  1. Need to return the ID Token

Actual results

  1. Returning the ID Token as null.

Code sample

Code sample

Future handleSignIn() async {
try {
_googleSignIn.disconnect();

  final GoogleSignInAccount? account = await _googleSignIn.signIn();

  bool isAuthorized = account != null;

  log('onCurrentUserChanged....... $account');

  if (isAuthorized) {
    log('onCurrentUserChanged isAuthorized ${account.id} ${account.email}');

    GoogleSignInAuthentication googleSignInAuthentication =
        await account.authentication;

    // Access token
    String? accessToken = googleSignInAuthentication.accessToken;
    log('Access Token: $accessToken');

    // You can also get the ID token
    String? idToken = googleSignInAuthentication.idToken;
    log('ID Token: $idToken');
  } 
} catch (error) {
  log('handleSignIn Error: $error');
}

}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]
@danagbemava-nc danagbemava-nc added the in triage Presently being triaged by the triage team label Apr 29, 2024
@danagbemava-nc
Copy link
Member

Hi @thufail14, can you try #20903 (comment) to see if it works for you? If it does not, can you share how you setup your project for google sign in?

@danagbemava-nc danagbemava-nc added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 29, 2024
Copy link

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.

Copy link

github-actions bot commented Jun 3, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
None yet
Development

No branches or pull requests

2 participants