1

I have a persistent error that keeps on popping up. Here's the use case:

  1. User is logged in & has multiple tabs/windows of the app open.
  2. User logs out (session is successfully destroyed) & is redirected back to home page (root_path).
  3. User reloads or takes action on any of the other already open tabs.
  4. User encounters error and must manually navigate to root_path via address bar.

Is there a best practice to prevent this altogether? Is it better to have an error page that has a link to the root path where they can log back in?

I appreciate any help at all. Thanks!

orky
  • 241
  • 1
  • 4
  • 10

1 Answers1

2

According to the documentation if a user is not authenticatable you can redirect to a specific page.

https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-when-the-user-can-not-be-authenticated

Maybe it is also helpful :

Redirect to log in page if user is not authenticated with Devise

Community
  • 1
  • 1
Mark
  • 5,994
  • 5
  • 42
  • 55