Skip to Main Content
Mastering Elixir
book

Mastering Elixir

by André Albuquerque, Daniel Caixinha
July 2018
Intermediate to advanced content levelIntermediate to advanced
574 pages
14h 7m
English
Packt Publishing
Content preview from Mastering Elixir

Authenticating users

In the last chapter, we saw how we handle user passwords in the Accounts context, using the comeonin library to sign and verify them. In this chapter, our focus is on extending our web interface to allow users to sign up and log in to our application, and also to restrict certain pages to logged in users. There's a myriad of libraries in the Elixir ecosystem that would allow us to achieve this in only a few lines of code. However, implementing our own authentication solution is beneficial for two reasons: it will give us the opportunity to explore Phoenix in greater depth and it will give us more freedom in how the authentication is made, allowing us to adapt it to fit our needs.

In order to have users authenticated, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Testing Elixir

Testing Elixir

Andrea Leopardi, Jeffrey Matthias

Publisher Resources

ISBN: 9781788472678Supplemental Content