Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8064497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:23:04+00:00 2026-06-05T11:23:04+00:00

With the old google openid, when i sent a user (who had previously opted-in

  • 0

With the old google openid, when i sent a user (who had previously opted-in to my app) to the auth url, it would immediately redirect them back to my app.

Now, with OAuth2, the auth url keeps asking the user for permission. I read some of the docs on this, but what I dont get is how this flow i supposed to work:

  1. User logs into google via my app and clicks ALLOW for permissions
  2. Days later, cookies are cleared, user comes back to my site, clicks “Login to google”
  3. User is not asked for permission again and they are immediately logged in.

I think it has something to do with storing the auth token or refresh token in step 1,
but in Step 3, I don’t know who they are, so how can i match them with the proper auth or refresh token to gain a valid access token.

In my tests, when I send them to the original auth url in step 1, they are asked for permissions again.

EDIT: Found the solution

The google-api puts “approval_prompt=force” by default when creating the auth url.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T11:23:05+00:00Added an answer on June 5, 2026 at 11:23 am

    Yes as you’ve noted using the approval_prompt=force URL parameter will force showing the auth dialog to the user every single time. By simply removing this URL parameter the user will not be prompted on subsequent auth flows.

    There is a slight difference in the response that you will get if you use the server-side flow (response_type=code) and offline access (access_type=offline). The first time the user authorizes you (when he sees the approval screen) or if you force this by using approval_prompt=force then when you exchange the auth code you will be granted a refresh_token and an access_token.

    However every time the user is not shown with the approval screen (subsequent auth when not using approval_prompt=force), when exchanging the auth code you will only be granted an access_token, no refresh_token. So if that’s the flow you are using and if you want to be able to access the user’s data offline you need to make sure that you save the refresh_token locally for future use when you get it the first time.

    That is only likely to happen if you request access to another type of data than simply the auth data though (using the OAuth 2 flow you can request access to other data, for instance, Contacts API data, Calendar API data, Drive data, etc…) as, usually, a regular Open ID flow would not need offline access.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to redirect an old url indexed by google to a new one
I'm getting back to programming for Google App Engine and I've found, in old,
I had to repair an old project regarding google maps so this is in
I am coming back to an old Google App Engine project on which I
Hi My app is an Google api map. I would like it to be
In the old static image Google charts I have been producing a combined chart
Currently what is happening is people are accessing old URLs from google like icpaweb.com/site/pages/about-us/
Google, Github and Stackoverflow bring up django-schedule and django-mailer, but these are both old
Update 2022 There is cloud sql proxy now: https://cloud.google.com/sql/docs/mysql/sql-proxy#how-works Old Question I am currently
The old JS SDK had a function called FB.ensureInit. The new SDK does not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.