Skip to content

Redirect error with Turbo #236

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

Open
Funloi2 opened this issue Apr 23, 2025 · 1 comment
Open

Redirect error with Turbo #236

Funloi2 opened this issue Apr 23, 2025 · 1 comment

Comments

@Funloi2
Copy link

Funloi2 commented Apr 23, 2025

I've come accross a bug where I am not redirected to my client on a successful authentification. The flow work perfectly until the point where the server should redirect me to my client. I first it was flagged as a CORS error, then I solved the supposed error bug I was still not redirected.

I've disabled Turbo and it worked perfectly, any idea why?

Something to note is that, when I try to connect when turbo was on, I was redirected to my login page, but I was connected. so if I manually try to access my client or any other page that is user restricted, I had no issue.

@ajgarlag
Copy link
Contributor

ajgarlag commented Apr 24, 2025

Is Turbo enabled in the server, the client or both? In an application that uses turbo, I recommend adding the data-turbo="false" attribute to any anchor or form that might ultimately redirect to another domain to avoid CORS errors.

As an alternative, you can use the workaroud I wrote sometime ago, that is referenced in my comment to the related Turbo issue hotwired/turbo#203.

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

No branches or pull requests

2 participants