How to implement user authentication in phoenix

2019-06-17 08:59发布

I was creating a webapp in phoenix, I was wondering what could be a better way to implement user registration/authentication and session management in it.

On googling I found these two libraries: addict and passport

But I am not sure how much stable are these and are they being used in production somewhere. Please let me know if there are some libraries safe to use in production and if there are some example implementation of those.

3条回答
趁早两清
2楼-- · 2019-06-17 09:18

Addict seems to be the more mature project and appears to be "the one" right now. In order to find good Elixir libraries, I always like to consult the Awesome Elixir Github repo.

查看更多
戒情不戒烟
3楼-- · 2019-06-17 09:38

I think at this point it's easier to implement it yourself. It should not take you long if you're comfortable with elixir and know phoenix's basics. There is nothing difficult about it

查看更多
做自己的国王
4楼-- · 2019-06-17 09:40

If you're rolling your own you might be interested in the Episode 3 and 5 of https://phoenixscreencasts.com/

(Note that they require a paid subscription)

EDIT: The site has been shut down by the author, this is no longer a valid response.

查看更多
登录 后发表回答