4 ms·
Last time I went to look at elixir it looked nice, is there an accepted user-mangement system for phoenix yet? User auth is a combination of the three things I
by IanCal 10y ago
Last time I went to look at elixir it looked nice, is there an accepted user-mangement system for phoenix yet? User auth is a combination of the three things I least want to implement myself:
1. Security. Small non-obvious mistakes are easy to make and very important.
2. High visibility. Risky, and if it goes wrong it's a major thing your customers notice.
3. Dry. It's just not particularly interesting for me, it's certainly solved in other frameworks (e.g. devise). I'm aware this last point is extremely selfish of me, however.
- gregpardo 10y agoGuardian is the most used. You can use Canary for authorization.
- holtalanm 10y agoI can attest that using Guardian is probably the best way to go so far with Phoenix. It worked great.
- enraged_camel 10y agoI use Coherence. It tries to be similar to Devise (of Rails fame).
- xutopia 10y agoDo you test your controllers? I'm trying to find some good documentation on how to do that but get warnings to use `build_conn` instead of `conn` when using the example here: https://github.com/smpallen99/coherence/wiki/Testing-with-Coherence https://github.com/smpallen99/coherence/wiki/Testing-with-Co...
- jclem 10y agoIf you're getting that in a test, my guess is that you're not passing a context argument with `conn` in it to your test function (e.g. `test "foo", %{conn: conn} do`. There's a deprecated `conn/0` function that you'll accidentally call instead if you forget to do this.
- behrendtio 10y ago`conn` is the old version, newer versions of Phoenix use `build_conn`. Just use that
- enraged_camel 10y agoI don't generate my own controllers when installing Coherence. I just use the ones that come "out of the box."
- BrianHV 10y agoBecause of the points you mentioned, I've been wondering why I haven't been able to find a framework-independent, open-source user management and authentication system. This seems like the sort of thing that should be solved in a standard way and not reinvented by every framework (or worse, application) that needs user management. I've come across some paid services (e.g., stormpath, auth0) that seem to do what I'm talking about. It would be really nice if there were a free project along those lines though.
- awinder 10y agoThe API gateway approach has a lot of the upsides you mention: 1. http://microservices.io/patterns/apigateway.html http://microservices.io/patterns/apigateway.html 2. https://getkong.org/ https://getkong.org/ (a few auth plugins) 3. https://github.com/auth0/nginx-jwt https://github.com/auth0/nginx-jwt / https://www.stavros.io/posts/writing-an-nginx-authentication-module-in-lua/ https://www.stavros.io/posts/writing-an-nginx-authentication...
- iamveen 10y agoI have yet to use this for anything, so I can't vouch for it's quality, but it seems to be exactly what you are looking for. http://www.keycloak.org/ http://www.keycloak.org/ Website blurb: Add authentication to applications and secure services with minimum fuss. No need to deal with storing users or authenticating users. It's all available out of the box. You'll even get advanced features such as User Federation, Identity Brokering and Social Login.
- Can_Not 10y agoI don't think I understood your question, but this might be helpful for people having issues in similar keyword spaces: https://github.com/iNeedThis/phoenix-starter https://github.com/iNeedThis/phoenix-starter