darkmarmot

darkmarmot

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.

Most Liked

Schultzer

Schultzer

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

idi527

idi527

:waving_hand:

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.

Last Post!

darkmarmot

darkmarmot

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

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Other popular topics Top

vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement