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

vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
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
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36689 110
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New