You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Garrett George edited this page Mar 16, 2021
·
8 revisions
In case your app requires users to be authenticated for all pages, and to avoid the "You need to sign in or sign up before continuing." message when trying to access the application root, add this to your routes.rb:
In case your app has only omniauthable but no database_authenticatable, then the path /users/sign_in would not make sense. Something like the following might suit well in such case:
As of Rails 4+, two routes with the same name will raise an exception at app load time. In the above example, it is important to note that the two routes respond to the same URL but they have two different route names (authenticated_root_path and root_path).