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 approval_prompt: force to get new refresh_token #124

Closed
DTrejo opened this issue Dec 24, 2013 · 1 comment
Closed

support approval_prompt: force to get new refresh_token #124

DTrejo opened this issue Dec 24, 2013 · 1 comment
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@DTrejo
Copy link

DTrejo commented Dec 24, 2013

It would be awesome if this were supported:

Important: When your application receives a refresh token, it is important to store that refresh token for future use. If your application loses the refresh token, it will have to re-prompt the user for consent before obtaining another refresh token. If you need to re-prompt the user for consent, include the approval_prompt parameter in the authorization code request, and set the value to force.
https://developers.google.com/accounts/docs/OAuth2WebServer#offline

@DTrejo
Copy link
Author

DTrejo commented Dec 24, 2013

This can be achieved like so:

  // generate consent page url
  var url = oauth2Client.generateAuthUrl({
    access_type: 'offline', // will return a refresh token
    scope: 'https://www.googleapis.com/auth/calendar',
    approval_prompt: 'force'
  });

@DTrejo DTrejo closed this as completed Dec 24, 2013
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 6, 2020
This was referenced Jun 20, 2023
This was referenced Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants