mirror of
https://github.com/simple-login/app.git
synced 2024-11-14 08:01:13 +01:00
Add login_required to the account_activated page
This commit is contained in:
parent
893520c361
commit
f7e27ce0da
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
from app.onboarding.base import onboarding_bp
|
from app.onboarding.base import onboarding_bp
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from flask import redirect, render_template, request, url_for
|
from flask import redirect, render_template, request, url_for
|
||||||
|
from flask_login import login_required
|
||||||
|
|
||||||
|
|
||||||
CHROME_EXTENSION_LINK = "https://chrome.google.com/webstore/detail/simpleloginreceive-send-e/dphilobhebphkdjbpfohgikllaljmgbn"
|
CHROME_EXTENSION_LINK = "https://chrome.google.com/webstore/detail/simpleloginreceive-send-e/dphilobhebphkdjbpfohgikllaljmgbn"
|
||||||
|
@ -16,7 +17,6 @@ class Browser(Enum):
|
||||||
|
|
||||||
|
|
||||||
def get_browser() -> Browser:
|
def get_browser() -> Browser:
|
||||||
|
|
||||||
user_agent = request.user_agent
|
user_agent = request.user_agent
|
||||||
if user_agent.browser == "edge":
|
if user_agent.browser == "edge":
|
||||||
return Browser.Edge
|
return Browser.Edge
|
||||||
|
@ -38,6 +38,7 @@ def is_mobile() -> bool:
|
||||||
|
|
||||||
|
|
||||||
@onboarding_bp.route("/account_activated", methods=["GET"])
|
@onboarding_bp.route("/account_activated", methods=["GET"])
|
||||||
|
@login_required
|
||||||
def account_activated():
|
def account_activated():
|
||||||
if is_mobile():
|
if is_mobile():
|
||||||
return redirect(url_for("dashboard.index"))
|
return redirect(url_for("dashboard.index"))
|
||||||
|
|
Loading…
Reference in a new issue