Skip to content

Conversation

@duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Jan 9, 2026

This pull request fixes an issue when logging in with 2FA where you'd be redirected to the 2FA challenge back, then immediately back to the login page.

This was due to us always redirecting to the referrer URL. I've added a conditional before redirecting to check if a 2FA challenge is required.

Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks regular logins. You get inertia-redirected to the dashboard but we don't want that. We want a full redirect since once inside the cp more stuff is needed to be initialized.

@duncanmcclean duncanmcclean changed the title [6.x] Don't redirect to referrer after login when Inertia response is returned [6.x] Don't redirect to referrer when 2FA challenge is required Jan 9, 2026
@duncanmcclean
Copy link
Member Author

Ahhh, so it does. Just pushed up a slightly different approach, let me know what you think!

@jasonvarga jasonvarga merged commit 58993e6 into master Jan 9, 2026
13 checks passed
@jasonvarga jasonvarga deleted the login-redirect branch January 9, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants