Skip to content
Discussion options

You must be logged in to vote

There aren't built-in constraints that correspond to Devise's authenticated & unauthenticated, but you can write custom ones:

constraints -> (r) { !r.env["rodauth"].authenticated? }
  root 'pages#home'
end

constraints -> (r) { r.env["rodauth"].authenticated? }
  root to: redirect('/dashboard'), as: :authenticated_root
end

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@monsteronfire
Comment options

Answer selected by monsteronfire
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants