Third party login path forward fails
Closed this issue · 0 comments
ranjanistic commented
What's happening
When a link is clicked which requires an authenticated user, the request is redirected to the login view.
After successfully logging in using email & password, the previous request to link is resumed. (This happens because the link is stored in "next" query while the login page renders, and is forwarded to this on successful login, including 2FA)
But the same thing isn't happening when logging in via third party auth (Google, GitHub etc.)
How to reproduce
- Logout
- Visit a link on Knotters which requires authenticated user (like
knotters.org/auth/
), it will redirect to login page - On login page, use GitHub login (or others)
- On successful login, you will be redirected to homepage, instead of the
/auth/
page (which only happens correctly when login via email password)
How to proceed with debugging
Apparently the problem lies in the way "next" is being set for third party login buttons (in login and other templates), and also in the intermediate instruction page which renders after clicking those buttons.