Skip to content

How to pass access_type=offline in GIDSignIn class #566

@anuragverse14

Description

@anuragverse14

Describe the bug
I want to pass access_type=offline in GIDSignIn class SignIn method so that i will get a serverAuthCode which will help in getting refresh_token_expires_in for ongoing access details in google OAuth token api.

To Reproduce
Steps to reproduce the behavior:

  1. Call GIDSignIn.sharedInstance.signIn(withPresenting: rootViewController, hint: email, additionalScopes: scopes)
  2. User get prompted for google sign in and then scopes list will be shown to the user.
  3. User will not select Ongoing access and select all required scopes, then click on continue.
  4. Code side we will get serverAuthCode and we will use google Oauth token api to get refresh token.
  5. We will get refresh token but not refresh_token_expires_in to know whether refresh token is long lived or not.

Expected behavior
As user has not selected ongoing access, we should be getting refresh_token_expires_in and it should be 15551999.

Environment
Device: iPhone 11
OS: 18.2.1
Browser: Internal browser(may be safari) launch by GIDSignIn

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageIssues that need to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions