Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Server auth token returning null everytime with new Google Sign In package #57741

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

Closed
agharshit08 opened this issue May 21, 2020 · 2 comments
Closed

Comments

@agharshit08
Copy link

I am trying to fetch the server auth token this way but I am getting null as output everytime, I have setup the client ID with google developers console but still things are not working fine. How can I retrieve the token which I have to send to backend?

void connectWithGoogleFit() async {
    final GoogleSignIn googleSignIn = GoogleSignIn(
        scopes: <String>[
          'email',
          'https://www.googleapis.com/auth/fitness.activity.read',
        ]);
    final GoogleSignInAccount googleUser = await googleSignIn.signIn();
    final GoogleSignInAuthentication googleSignInAuthentication =
        await googleUser.authentication;
    String serverAuthToken = googleSignInAuthentication.serverAuthCode;
    print('token');
    print(serverAuthToken);
  }
@TahaTesser
Copy link
Member

duplicate of #57712

@github-actions
Copy link

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 Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants