def auth_redirect():
err = ds_authentication.auth_redirect()
# err is False or an error message
# We will use the Flash technique to show the message on the home page.
# Or a simpler alternative would be to show the error message on an intermediate
# page, with a "Continue" link to the home page
if err:
flash(err)
# flash("Debug info: " + str(request.headers))
# Authentication / re-authentication was successful
# Figure out what to do next
if "auth_redirect" in session:
auth_redirect = session["auth_redirect"]
if auth_redirect:
session["auth_redirect"] = False
return redirect(auth_redirect)
return redirect(ds_recipe_lib.get_base_url(1))
评论列表
文章目录