bobbypriambodo
Hi, I’ve just released my first hex package today (yay!).
Phoenix.Token.Plug is a collection of plugs for Phoenix.Token-based authentication, useful for API calls. It’s a bit like Guardian, but designed to use Phoenix.Token instead of JWT. Currently it only supports verifying Authorization header and ensuring that a request is authenticated, which fits my use case, but there are more available and interesting capabilities yet to be discovered.
Usage instruction is on the GitHub readme. Do give feedbacks, issues, and PRs! ![]()
Trending in Announcing
WebAuthnLiveComponent WebAuthnComponents
See this post about renaming the package.
Passwordless authentication for Phoenix LiveView app...
New
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
I released Doggo, a collection of unstyled Phoenix components.
https://github.com/woylie/doggo
Features
Unstyled Phoenix components....
New
Hi everyone,
I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
I’ll shortly be launching Text, a nascent text analysis library.
Current functionality
In this early version (not ready for prime time) ...
New
Following on from my CLDR lbraries I started work on Unicode transforms. But like everything related to CLDR there is a lot of yak-shavin...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex











Showing Posts 1 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
OvermindDL1
Awesome! Just need a VerifyCookie to copy the VerifyHeader functionality and it is the basics of what is needed.
OvermindDL1
And a way to customize the assign key to something other than
:useras someone may already use:useror may want multiple lookups.EDIT: And a way to customize the callback function name too on EnsureAuthenticated. ^.^
chrismccord
Very nice! One recommendation I have is the community convention would be to not stomp the Phoenix namespace. So instead of Phoenix.Token.Plug, can you rename your project to
PhoenixToken? Then thePhoenixToken.Plugmodule could be called as normal.bobbypriambodo
@OvermindDL1, thanks for the suggestions! I’ll see what I can do
Oh, I must have missed the convention. My reference for naming it was this point on https://hex.pm/docs/publish:
Since I thought
Phoenix.Token.Pluggives the verifying functionality toPhoenix.Token, that was what I went with. I probably misunderstood that point. I’ll rename it ASAP, thanks for the recommendation!bobbypriambodo
I’ve just published
phoenix_token_plugv0.2.0, which renames the namespace toPhoenixTokenPlug. I figured I might as well merge the.Plugnamespace sincePhoenixTokenwouldn’t have any functionality on its own (and neither wouldPhoenixToken.Plug). I’ve also added the functionality suggestions to the repo’s issues and will tackle it when I have the time.Keep in mind that the API might still be unstable at this point
OvermindDL1
Eeh, you never know, could end up writing more non-plug helpers for it or so. ^.^
/me is a fan of more namespaces.
bobbypriambodo
At least I still have the
I guess we’ll see how it unfolds, naming things is hard.
PhoenixTokenPlugmodule for utility functions, or if it comes to it, possiblyPhoenixTokenPlug.Utils?bobbypriambodo
I have an idea in mind, but I want to make sure first: how do you see this happening? Is it common to put stateless authentication tokens in their cookies, seeing as
Plug.Sessionalready has a solution for putting session data in and storing the key in cookies? And do you think that means we needVerifySessiontoo (seeing as Guardian has one)? It would probably help if you provide some example use cases for itOvermindDL1
A
VerifySessionwould probably make more sense yep.