Answer the question
In order to leave comments, you need to log in
How to allow only one type of user to authenticate through devise?
I have several types of users in my application (user, admin, etc.)
Authentication goes through gem devise.
How can I make it so that there is only one session? For example, I am logged in as admin and could not
log in and register as user.
Answer the question
In order to leave comments, you need to log in
As an option - when the user authorizes, close the remaining sessions of this user.
I want to make it so that it would be impossible to authenticate to a different type of user at all. For example, I am logged in as admin and try to log in as admin, then I am sent the devise 'You are already logged in.'
I need that also when I logged in as admin and try to register as user.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question