Skip to content

google_sign_in: expose expires_in and session_state.extraQueryParams.authuser in GoogleSignInTokenData / GoogleSignInAuthentication #80905

@kevmoo

Description

@kevmoo

This data is present in the replies from Google's auth API.

{
 "token_type": "Bearer",
 "access_token": "redacted",
 "scope": "email profile https://www.googleapis.com/auth/youtube.readonly openid https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile",
 "login_hint": "redacted",
 "expires_in": 3599,
 "id_token": "redacted",
 "session_state": {
  "extraQueryParams": {
   "authuser": "0"
  }
 }
}

This will allow correct population of authHeaders

https://github.com/flutter/plugins/blob/9ac4fb87f0889d4244b8516d4ec4e4b5ae83ae77/packages/google_sign_in/google_sign_in/lib/google_sign_in.dart#L107-L113

And access token expiry:

https://github.com/flutter/packages/blob/ad3368b217ee314e93ec778294840583901b33c1/packages/extension_google_sign_in_as_googleapis_auth/lib/extension_google_sign_in_as_googleapis_auth.dart#L29-L34

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: google_sign_inThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions