I'm using Devise to authenticate. However, I have 3 profile types, and I created the rails g devise MODEL
command for my users (Admim, dev and manager), but Devise created a login page for each profile type, I would like to unify and log in using only one page!.
My idea is to create a view by picking up the email and the password and passing it to a custom controller inheriting from ** Devise :: Sessions
** and overwriting the method that logs in, searching the email in the 3 tables and redirecting the user to the Controller responsible for his profile.
How could I do this "manual login" with Devise? Any other solution to this?
Aucun commentaire:
Enregistrer un commentaire