add github support, fix redirect on oauth

This commit is contained in:
Matthew Scragg 2015-10-21 09:09:42 -05:00
parent 4fede50136
commit 4375db4f8c
2 changed files with 19 additions and 9 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 current_app.config['ROOT_ENDPOINT']
next_url = request.args.get('next') or url_for(current_app.config['ROOT_ENDPOINT'])
try:
resp = User.get_app(provider).authorized_response()
if resp is None: