Alright I have two roles setup in Devise: User and Employer.
Right now you can login as a user AND employer simultaneously. However, I want to destroy the user session when logging in as an employer and visaversa.
Anyone have any idea how to do this? Thanks!
You may need to monkey patch the method destroy in Devise::SessionsController. Check if it is the employer that tried to sign out then destroy the session for user’s session as well. You need to check in details how the destroy function works.