uranther
What combination of libraries do you use for your Phoenix web app for standard user authentication? There are a couple listed in the awesome-elixir list, notably, ueberauth.
What I am looking for is a basic user account (email/password), register, login/logout, forgot password, and roles/groups for ACL. I want an admin panel for managing users, too, but I realize I will probably have to build this out.
Most of what I see is for basic JSON Web Token (JWT) authentication for API backends or similar. So I am a little confused about the standard practice for user auth in a plain ol’ web app.
I bet this has been blogged about somewhere… ![]()
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
The obligatory hello world thread!
Who are you and where are you from? :stuck_out_tongue:
New
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog
It says that Fly is going all-in on sprites, which is a worry ...
New
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using.
We’re particularly inte...
New
Is there a word for the ~> symbol used in Version strings?
Do you also just call it a Squiggle Arrow™ ?!
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
New
Latest Phoenix Threads
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #phoenix_html
- #elixirconf-us
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
AstonJ
I will probably roll my own, but I’m interested in hearing what others have to say here.
Did you look at what’s in hex.pm btw? Basic_auth seems to be fairly popular.
uranther
I took a browse through hex.pm but didn’t see anything promising except
authenticwhich doesn’t seem to be a real thing (the GitHub repo is an empty project).Basic_authwould be fine for the simplest apps, but what I am looking for is user account management and maybe even profiles.I think you are right about roll-your-own, but I am still pretty new to Elixir/Phoenix, and not sure how to go about it.
AstonJ
Are you from a Ruby/Rails background? If so there is an excellent series on user authentication at Rails Casts - when I come to roll my own I hope to do something similar to that.
(Btw I have just added ‘Languages you are interested in’ and ‘Languages you have used’ fields to our profiles)
uranther
I am from the PHP Symfony/Laravel side of things, but I don’t have that much experience in either.
AstonJ
Ah right, well you’re in for a treat with Elixir and Phoenix then (no offence to any PHP developers
)
With regards to your question, hopefully some others will chime in, but I would have thought watching a Laravel tut on auth should give you a fairly good idea on what you will need to implement in Phoenix, if not there is a very old Railscast on the topic that might be closer to Phoenix (this is just a guess as I’ve not learned any Phoenix myself yet).
Mandemus
A lot of the Phoenix blogs I see seem to use guardian. It’s also JWT based. The exception being the Trello clone tutorial. They appear to be rolling their own authentication system.
I get that Phoenix wants to remain authentication agnostic. However this makes me curious as the big feature in the next iteration of Phoenix is channel presence. Not sure how they plan to implement that without having any built-in conception of a user.
uranther
I found this Phoenix/Guardian example app which seems to have all I need. I am trying that out now.
World_Reactor
I am working on a project myself and I am considering using Openmaize.
I found a great example which demos all the basic functionality you mentioned and more.
Hope this helps!
uranther
Great find! This looks a lot simpler to get setup.
sashaafm
uberauth/guardian seems to be very common and popular.
The Programming Phoenix book and other beginner friendly resources use Comeonin which has Bcrypt (not sure if it can be considered exactly the same as Guardian?). I’ve been using it in my project and it’s nice.
There’s also Basic Auth which I’ve used in a blog. It’s pretty simple and it’s just to setup an authentication form to access certain pages and resources (useful for a blog since only you want to access the create new post action and so on).