August 2025
Intermediate to advanced
294 pages
6h 59m
English
AshAuthentication supports a number of authentication strategies[93]—ways we can identify users in our app. Traditionally, we think of logging in to an app via entering an email address and password, which is one of the supported strategies (the password strategy), but there’re several more. We can authenticate via different types of OAuth or even via magic links sent to a user’s email address.
Let’s set the password strategy up and get a feel for how it works. AshAuthentication comes with igniters to add strategies to our existing app, so you can run the following command:
| | $ mix ash_authentication.add_strategy password |
This will add a lot more code to our app. We now have:
Two new attributes ...
Read now
Unlock full access