Skip to content
Snippets Groups Projects
Verified Commit 8d68e7c0 authored by Mark's avatar Mark
Browse files

Refactor

parent 97925de1
No related branches found
No related tags found
1 merge request!3Change login provider backend to graphql
Pipeline #287 passed with stages
in 4 minutes and 17 seconds
......@@ -23,17 +23,16 @@ def user_loader(username):
return
return user
@app.route('/')
@app.route('/', methods=['GET'])
@login_required
def home():
logout_form = LogoutForm()
if request.method == "GET":
challenge = request.args.get("login_challenge")
if not challenge:
return render_template('home.html', email=current_user.email, logout_form=logout_form)
else:
redirect_to = hydra.login_request(challenge).accept(current_user.email)
return redirect(redirect_to)
challenge = request.args.get("login_challenge")
if not challenge:
return render_template('home.html', email=current_user.email, logout_form=logout_form)
else:
redirect_to = hydra.login_request(challenge).accept(current_user.email)
return redirect(redirect_to)
@app.route('/login', methods=['GET', 'POST'])
def login():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment