Working Phoenix 1.4 auth example?

I’ve been using Elixir pretty heavily for over a year now, and am a major proponent of the language and BEAM now – but I have minimal experience with Phoenix.

Unlike my past web experiences with things like Node, PHP and (even) Java, all of my attempts to implement basic functionality in Phoenix have been really painful. I never used Ruby on Rails – and maybe that explains some of my misery.

I’m trying to just find a nice example of basic authentication with Phoenix 1.4+ against a service like Github OAuth2 or custom db with email validation (with LiveView would be a bonus).

It looks like Ueberauth is the de facto standard? But their basic demo fails or bugs out on me in weird ways (can’t logout for some, can’t login for others – and the Twitter link asks for insane permissions).

https://ueberauth-example.herokuapp.com/

I’d like to just find one nice simple implementation of auth that works against the current Phoenix builds.

Perhaps I’m just really bad at web stuff, but it’s been super frustrating for me.

Any recommendations would be truly appreciated!

Thanks,
Scott S.

:wave:

FWIW, I usually use oauth2 for oauth (it has a github demo) and custom code for everything else.

I tried using ueberauth and some other auth libraries a few times, but always ran into limitations or defaults that didn’t fit well into my projects.

2 Likes

Have to given Pow Assent a chance? we use it in production.

5 Likes

Thanks, I’ll go those a shot! :slight_smile: