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!

jihantoro

jihantoro

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Where Next?

Popular in Questions Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
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
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130579 1222
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
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
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42576 114
New

We're in Beta

About us Mission Statement