
Ask HN: User authentication in web frameworks - codepie
I have worked with couple of web frameworks and have realised that user authentication is something which is common in most of the web apps. In my case, I ended up rewriting the user authentication module from scratch while developing a new web app.
Is there any boilerplate code available for this specific task in different frameworks(for example flask, django), which is flexible enough to be used in different web apps? Or is there any library which makes this task easier?
I would really like to see a repository containing example code for user authentication in different frameworks.
======
christiansmith
Little late to the party but have you considered using something like an
authorization server?

We created Anvil Connect (based on OAuth 2.0 and OpenID Connect) to solve a
bundle of auth-related problems all at once. It's a separate server instead of
a library, because once you need to share user accounts between several apps
(think different platforms) the complexity increases dramatically. There are
(third party) client libraries available for a number of languages.

[https://github.com/anvilresearch/connect](https://github.com/anvilresearch/connect)

