I find it very difficult to implement Google OAuth with Flask-Dance. Here is the deal. To do everything, I need to install offline=True
and reprompt_consent=Truewhen creating a Google plan:
google_bp = make_google_blueprint(
client_id="trololo",
client_secret="ololo",
offline=True,
reprompt_consent=True,
scope=["email"],
redirect_url="/callback/google"
)
However reprompt_consent=True, naturally, the user makes the reprompt application for offline access every time the user logs on.
Any other combination of these 2 parameters results in a lack of refresh_tokenfor Oauth2lib.
I do not need offline access as such, but as I understand it, this is the only way to avoid this error. So, is there another way to log in using Google using Flask-Dance and pass this one on refresh_token?