logout inactive on exteranal auth
This commit is contained in:
@@ -195,6 +195,9 @@ def login():
|
||||
|
||||
@bp.get("/logout")
|
||||
def logout():
|
||||
# Note: External providers such as Tinyauth own the login session, so pyTorrent must not pretend to log the user out locally.
|
||||
if auth.uses_external_provider():
|
||||
return redirect(url_for("main.index"))
|
||||
auth.logout_user()
|
||||
if not auth.enabled():
|
||||
return redirect(url_for("main.index"))
|
||||
@@ -212,6 +215,8 @@ def index():
|
||||
bootstrap_themes=BOOTSTRAP_THEMES,
|
||||
font_families=FONT_FAMILIES,
|
||||
auth_enabled=auth.enabled(),
|
||||
auth_provider=auth.provider(),
|
||||
external_auth=auth.uses_external_provider(),
|
||||
current_user=auth.current_user(),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user