-
-
Notifications
You must be signed in to change notification settings - Fork 41
Transition from Devise
Ken Decanio edited this page Mar 22, 2025
·
1 revision
For those transitioning from Devise to Rodauth-rails.
One often sees authentication dependent root paths as such:
authenticated :user do
root to: "pages#home", as: :authenticated_root
end
unauthenticated do
root to: "pages#welcome"
end
This, does not work with Rodauth-rails. One can use:
if Rodauth::Rails.rodauth.logged_in?
root to: "pages#home", as: :authenticated_root
else
root to: "pages#welcome", as: :unauthenticated_root
end
but this is an "internal request" so one must enable such"
In rodauth_main.rb in the configure do
section add :internal_request