bnchrch
Auth0_jwks - I made an Auth0 plug so you don't have to!
Hey all,
I spent a good part of today battling with Auth0’s awkward documentation and muddy concepts trying to figure out how I can turn an access token from my web client into actionable user data on my API.
As a result I created a small plug to help the community avoid the pitfall I ran into trying to get this running. I hope you enjoy!
https://github.com/bechurch/auth0_jwks
P.s. I’ll put out a tutorial around this in a week or so
Most Liked
chulkilee
Welcome to the forum - and thanks for the contribution to the community ![]()
Quick notes
Do you need to handle bearer not Bearer?
Note that “Bearer” is now case sensitive. Per original HTTP spec, auth scheme is case insensitive (RFC 2617 - HTTP Authentication: Basic and Digest Access Authentication) however “Basic” and “Bearer” are exceptions (see RFC 6750 - The OAuth 2.0 Authorization Framework: Bearer Token Usage)
In my case, I usually just accept the good request (Bearer) - then you can simplify this by pattern match on the string - "Bearer " <> token = header
Last Post!
Jono
Popular in Announcing
Other popular topics
Latest Phoenix Threads
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
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









