Skip to content

Commit 5d609b2

Browse files
committed
Also log out from Microsoft Identity platform
1 parent 509b3a2 commit 5d609b2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ def authorized():
5050
def logout():
5151
session["user"] = None # Mark current session as not-logged-in
5252
# session.clear() # If you prefer, this would nuke the user's token cache too
53-
return redirect(url_for("index"))
53+
return redirect( # Also need to logout from Microsoft Identity platform
54+
"https://login.microsoftonline.com/common/oauth2/v2.0/logout"
55+
"?post_logout_redirect_uri=" + url_for("index", _external=True))
5456

5557
@app.route("/graphcall")
5658
def graphcall():

0 commit comments

Comments
 (0)