mirror of
https://github.com/simple-login/app.git
synced 2024-09-20 23:16:00 +08:00
handle the case user clicks on cancel
This commit is contained in:
parent
abda0091ce
commit
631e251d8c
|
@ -48,6 +48,11 @@ def facebook_login():
|
|||
|
||||
@auth_bp.route("/facebook/callback")
|
||||
def facebook_callback():
|
||||
# user clicks on cancel
|
||||
if "error" in request.args:
|
||||
flash("please use another sign in method then", "warning")
|
||||
return redirect("/")
|
||||
|
||||
facebook = OAuth2Session(
|
||||
FACEBOOK_CLIENT_ID,
|
||||
state=session["oauth_state"],
|
||||
|
|
|
@ -39,6 +39,11 @@ def github_login():
|
|||
|
||||
@auth_bp.route("/github/callback")
|
||||
def github_callback():
|
||||
# user clicks on cancel
|
||||
if "error" in request.args:
|
||||
flash("please use another sign in method then", "warning")
|
||||
return redirect("/")
|
||||
|
||||
github = OAuth2Session(
|
||||
GITHUB_CLIENT_ID,
|
||||
state=session["oauth_state"],
|
||||
|
|
|
@ -48,6 +48,11 @@ def google_login():
|
|||
|
||||
@auth_bp.route("/google/callback")
|
||||
def google_callback():
|
||||
# user clicks on cancel
|
||||
if "error" in request.args:
|
||||
flash("please use another sign in method then", "warning")
|
||||
return redirect("/")
|
||||
|
||||
google = OAuth2Session(
|
||||
GOOGLE_CLIENT_ID,
|
||||
state=session["oauth_state"],
|
||||
|
|
Loading…
Reference in a new issue