python - Flask-Dance and TokenExpiredError -


how code around error: oauthlib.oauth2.rfc6749.errors.tokenexpirederror

i spent while trying try/except block no luck on this. errors seems happen when session stale, life of me can't figure out how refresh session.

here's code causes that:

@main.route('/', methods=['get', 'post']) def index():     if google.authorized:         user_profile = json.loads(google.get("/userinfo/v2/me").content)          new_user = user.load_by_id(user_profile['id'])         if not new_user:             user.create(user_profile)         else:             login_user(new_user)             if current_user.is_authenticated:                 return render_template("index.html", menu=menu)      return redirect(url_for('user.signin')) 

looks issue posted on @ singingwolfboy/flaskdance#35


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -