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

Support more options for Google Auth #16

Open
FunMiles opened this issue Dec 27, 2020 · 0 comments
Open

Support more options for Google Auth #16

FunMiles opened this issue Dec 27, 2020 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@FunMiles
Copy link

Google Auth has several more options that are not exposed.
In particular for Server/Client cases where the user wants to authorize the server to make API calls, being able to obtain a code that the server can use to obtain a token and a renew token is important. The React package react-google-login offers

<GoogleLogin
        clientId="your-client-id"
        onSuccess={handleGoogleResponse}
        onFailure={handleGoogleResponse}
        cookiePolicy={'single_host_origin'}
        accessType='offline' // To get a non-expiring refresh token
        prompt='consent' // To force the code to allow to obtain a refresh-token each time (otherwise only the first in a session will get a refresh-token
        responseType='code' // Obtain a code to pass to the server
      />;

An added benefit is that the code method is safer than passing a token as documented by Google.

@antony antony added the help wanted Extra attention is needed label Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants