Commit a1c7f2fb authored by Linus Lewandowski's avatar Linus Lewandowski

Fix redirection for API-based login.

parent 37ea3567
Pipeline #17728653 passed with stages
in 8 minutes and 49 seconds
......@@ -41,10 +41,17 @@ def get_success_url(request, account_id, state=None):
if url_is_safe:
return redirect_to
return reverse('extauth:account-home', args=[account_id])
if not url_is_safe:
redirect_to = reverse('extauth:account-home', args=[account_id])
if request.flow:
if '?' in redirect_to:
redirect_to += '&flow=' +
redirect_to += '?flow=' +
return redirect_to
class AuthView(TemplateView):
template_name = 'registration/auth.html'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment