doorman
doorman copied to clipboard
Make `authenticate/2` more flexible
Currently, Doorman.authenticate/2
is hardcoded to find the user by an email field. This is the only thing in the library that depends on it, and it would nice to have that be more flexible.
For example, you could search for username:
Doorman.authenticate(password, username: username)
Or admins:
Doorman.authenticate(password, admin: true, email: email)
Check Entrance, a new authentication library built upon Doorman
There you can find this feature and much more