August 2025
Intermediate to advanced
294 pages
6h 59m
English
Some users nowadays think that passwords are just so passé, and they’d much prefer to be able to log in using magic links instead—enter their email address, click the login link that gets sent straight to their inbox, and they’re in. That’s no problem!
AshAuthentication doesn’t limit our apps to only one method of authentication; we can add as many as we like from the supported strategies[98] or even write our own. So there’s no problem with adding the magic link strategy to our existing password-strategy-using app, and users can even log in with either strategy depending on their mood. Let’s go.
To add the strategy, run the ash_authentication.add_strategy Mix task:
| | $ mix ash_authentication.add_strategy ... |
Read now
Unlock full access