thoughtbot / clearance

Rails authentication with email & password.

Home Page:https://thoughtbot.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work with Hotwire / Turbo

EmmaB opened this issue · comments

commented

Imported Turbo in application.js:

import { Turbo, cable } from "@hotwired/turbo-rails"

But this forces a Clearance session/create to post asynchronously "as TURBO_STREAM", which means flash messages don't render.

I overrode the views and added local: true to the form, but that wasn't enough. I don't know what lengths I'd have to go to to make it work: whether figuring out how to force the form to submit synchronously, or override the controller to respond with js. I removed Turbo, rather than spend time at this point digging deeper.