Single login

Hi,

I have a Phoenix application that has exactly the same authentication module that is in the Programming Phoenix book. How can I enforce that a single users can only be logged in once. The second login should kick out the old one, and all this without channels.

How can I achieve this?

1 Like

Where are the login sessions stored? If entirely in cookie then you should add it to a database of some form to so as to verify the session is active, then you can compare that on connections. :slight_smile:

1 Like