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
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
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
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

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
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
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40082 209
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