tyro

tyro

Auth0 (authentication) with phoenix

I have a situation where we’d like to use Auth0 for identity management/logins/sign-ups because it has good frontend ux for login/sign-up flow and might save implementation time.

The use case is for session management. I.e. logins and user sign ups for a standard server/client website where we also store the user in our own database. However I have some reservations because:

  • you apparently shouldn’t use JWT for sessions (link)
  • I can’t find any code examples with Auth0 where people have stored the user in their own database (e.g. on first time sign in you write to the db)
  • Auth0 is an extra integration which complicates the code
  • Auth0 doesn’t seem to have APIs webhooks for deleting/adding users so we’d have to do this in 2 places separately (Edit: it does have an api to add/delete users but no webhooks for that, so we would have to do user management via our website or do it in auth0 then our db separately)

So what am I asking? :stuck_out_tongue: Well, given those requirements do you have any advice on whether to use Auth0 or should it be avoided for this kind of situation? The only thing holding me back right now from rolling our own solution is the front-end time required and the concern that the front-end UX won’t be as good as Auth0’s.

Thanks!

Most Liked

aseigo

aseigo

Here’s a blog entry where they show how they used Guardian and Auth0 to do what you seem to be after:

For all-local signup/login, there is at least one lib that pulls that whole process together for you on Phoenix, complete with UX … still probably not as polished as Auth0’s, but gives you a head-start if you do opt for all-local:

I’ve played with coherence in prototypes and it is indeed pretty straight forward to get moving immediately.

Where Next?

Popular in Questions Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New

Other popular topics Top

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New

We're in Beta

About us Mission Statement