Rename route for SSO authorization

This commit is contained in:
Timotej Lazar 2023-09-11 15:14:36 +02:00
parent ea6aa37131
commit 0dc2563b31

View file

@ -46,10 +46,10 @@ def init_app(app):
@app.route('/login') @app.route('/login')
def login(): def login():
return oauth.azure.authorize_redirect(flask.url_for('auth', _external=True)) return oauth.azure.authorize_redirect(flask.url_for('authorize', _external=True))
@app.route('/auth') @app.route('/authorize')
def auth(): def authorize():
token = oauth.azure.authorize_access_token() token = oauth.azure.authorize_access_token()
user = users[user.username] = User(token.get('userinfo', {})) user = users[user.username] = User(token.get('userinfo', {}))
flask_login.login_user(user) flask_login.login_user(user)