-
-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"next" param ignored in some cases #214
Comments
Not sure I understand the issue here. Why would the login form's next field be empty in this case? Shouldn't it have populated from the GET parameter in this case? |
It not populated by LoginView of this package (on initial step if you have "next" in url, you will have empty hidden input in login form which will override value from GET on form submit). Django builtin view return
And context from django login view:
May be even better to return |
I'm still not sure why the |
I just ran into the same issue, when I replaced Django's login view with the two-factor LoginView. The difference between the two is that Django's
is rendered as
which causes the problem with the empty I have fixed this by sub-classing the two-factor LoginView and adding the missing Anyway, I think the two-factor LoginView should add |
When "next" param presents in both GET and POST dicts those from GET will be ignored even if value of POST is empty string.
core.py:112 (in LoginView)
I think above code should be with OR logic for cases when post param exist but empty (imagine you redirect user from some page on login form like example.com/accounts/login?next=/restricted/area and login form has hidden but empty "next" field).
The text was updated successfully, but these errors were encountered: