Store next url redirect for in session to work with oauth login callbacks

This commit is contained in:
Chase Sterling 2016-07-08 23:39:11 -04:00
parent 0b931d1a05
commit aa0a8a2aa8
4 changed files with 8 additions and 6 deletions

View file

@ -16,7 +16,7 @@ def login(provider):
@blueprint.route('/login/oauth/<provider>/callback')
def callback(provider):
next_url = request.args.get('next') or url_for(current_app.config['ROOT_ENDPOINT'])
next_url = session.get('next_url') or url_for(current_app.config['ROOT_ENDPOINT'])
try:
remote_app = User.get_app(provider)
resp = remote_app.authorized_response()