marcin
Blog Post: Phoenix auth in 2024: password and provider based auth with phx.gen.auth
Hi! ![]()
I wanted to refresh my knowledge on how to mix phx.gen.auth with local password users db, as well as OAuth providers such as Github, and wrote a guide on this in the end.
Hope it helps in some confusion around the topic I have seen on Elixir Forum!
Most Liked
marcin
@slouchpie thanks for a peer review!
Indeed a grave mistake on my part. Now updated.
7
slouchpie
A swift and honourable response. You have my respect.
5
slouchpie
This guide uses :rand.bytes/1 to generate a password.
not cryptographically strong
The auto-generated code they are discussing uses :crypto.strong_random_bytes, just like the erlang docs recommend.
It is easily changed, but this is meant to be an auth guide.
3
Popular in Blog Posts
Sharing some articles I’ve written recently while working in Elixir.
Some are how-to guides and others for reference. Will update this ...
New
https://readyforproduction.dev/blog/view-transitions-api-and-phoenix-liveview
New
Testing is an important part of any modern piece of software. But writing tests can quickly become an exercise in frustration, with tons ...
New
Elixir Blog Posts
How to use this section
You can post links to your blog posts either in one of the Official Blog Posts threads, or, vi...
New
We all have varying degrees of exposure to Big Tech. Some of it seems fine, stable and can be relied on. Some of it feels like shifting s...
New
This post explores different ways to do test automation in Elixir, focusing on how to handle dependency injection — covering patterns, li...
New
You are storing some Phoenix LiveView state in the browser. You want to retrieve that saved state as early as possible to improve the use...
New
Just finished a post for Embedded Elixir and I thought it should be cross-posted here:
https://embedded-elixir.com/post/2018-09-25-mocks...
New
Blogged about the motivation and reasoning behind my idea to create yet another FSM library. Long story short: I did it in a proper way :...
New
I had a bit of a mini-adventure following Sobelow’s advice on adding a CSP to a Phoenix App. If you want to follow along, or want to add ...
New
Other popular topics
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
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
In templates/appointment/index.html.eex:
<%= for appointment <- @appointments do %>
<tr>
<td><%= appoi...
New
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
Hi!
In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir?
Searched the docs for ip address and the web, no good results.
Thanks!
New
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
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
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
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
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance










