问题
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.
回答1:
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.
回答2:
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
回答3:
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.
来源:https://stackoverflow.com/questions/32805275/how-to-implement-user-authentication-in-phoenix