Commit a1c7f2fb by Linus Lewandowski

Fix redirection for API-based login.

parent 37ea3567
Pipeline #17728653 passed with stages
in 8 minutes 49 seconds
......@@ -41,10 +41,17 @@ def get_success_url(request, account_id, state=None):
url=redirect_to,
host=request.get_host()
)
if url_is_safe:
return redirect_to
else:
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=' + request.flow.id
else:
redirect_to += '?flow=' + request.flow.id
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