Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Error: Form responses must redirect to another location #34

Closed
blaiseAI opened this issue Sep 7, 2022 · 1 comment
Closed

Error: Form responses must redirect to another location #34

blaiseAI opened this issue Sep 7, 2022 · 1 comment

Comments

@blaiseAI
Copy link

blaiseAI commented Sep 7, 2022

Hi Matt, QQ. Just added devise in my rails app. Only changes added was to add devise and it's views. it usually sets a message on the flash[:notice] that a confirmation email has been delivered or failed. I have not added any custom behavior. It's a barebones Rails app with Devise added by following the instructions on GitHub.

Screen Shot 2022-09-07 at 1 04 32 AM

@mattbrictson
Copy link
Owner

I think this is a known problem with Devise and Rails 7 + Turbo. The workarounds are:

  • Remove Turbo from your app entirely, or
  • Customize the Devise views data: { turbo: false } to the forms, or
  • Customize the Devise controllers to fix their redirect behavior

In my recent project I did a combination of the 2nd and 3rd options.

There is some more discussion here:

heartcombo/devise#5446
heartcombo/devise#5458
https://betterprogramming.pub/devise-auth-setup-in-rails-7-44240aaed4be

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants