Concurrent User Sessions Using Devise with Subdomains

24 views
Skip to first unread message

Rizwan Reza

unread,
Jun 21, 2016, 3:15:22 AM6/21/16
to Devise
Hello,

I am using Devise to build multi-tenant web application using subdomains. Like Basecamp or Slack, the users should be able to login to multiple accounts (at different subdomains) concurrently. 

Since Devise uses the `:user` scope in Warden, it seems to override the `current_user` when the user logs into the second team. I have a few ideas on how to implement this, but would like to see if anyone else has come across this. My understanding is that warden scopes seem to be better used for roles, not subdomains. 

Is there a way to use the same scope and have Warden store multiple user IDs? 

Thanks,
Riz
Reply all
Reply to author
Forward
0 new messages