r/elixir•
freakytiki34

Per-Action Authentication/Authorization in Phoenix

I'm trying to find a workable pattern for authentication in Phoenix for an app that's very permissive about what you can view without an account.

I really miss my before_action callbacks from Rails, and I'm trying to find an effective replacement. But I seem to run into one problem after another, two of which I laid out in the following gist.

Example Code Here

Complete Application Here

Are there any standard solutions to this? Perhaps moving to something other than Guardian?

Posted Jul 16, 2017, 10:04 PM UTC

58
Loading comments…