Open morislwin opened 4 years ago
Just spit-balling ideas here as I'm not an expert, but I would guess you add logic to your '/login' route to check weather the client is logged in already. if client is logged in- take them somewhere else. if they aren't show them login
To fix it, change login method like this:
@auth.route('/login')
def login():
if current_user.is_authenticated:
return redirect(url_for('main.profile'))
return render_template('login.html')
The same with sign-up:
@auth.route('/signup')
def signup():
if current_user.is_authenticated:
logout_user()
return redirect(url_for('auth.signup'))
render_template('signup.html')
I already login and it not show login page but I can call localhost:5000/login in new Tab and can login with different user account. How can I disabled login page while I am login. ( I mean can not call login page in new Tab)