Closed tobiasdiez closed 10 months ago
Let's wait for the new nuxt3 auth module: https://github.com/nuxt/auth (https://v3.nuxtjs.org/community/roadmap/)
Why not Oauth2 ?
Azure B2C provides an implementation of Oauth2: https://docs.microsoft.com/en-us/azure/active-directory-b2c/authorization-code-flow. The point is that I don't feel like implementing it myself, or use expensive services such as auth0. See also #578.
Firebase authentication is also a good alternative if you are open to using services other than Azure. It’s free, open source and offers very similar features.
Thanks, that looks like a nice alternative indeed. I especially like that they have an sdk-solution, where you have full control of the user interface.
Be aware that as soon we distribute user related data outside European Economic Area we have to explicitly inform the user about this and ask for his permission. Maybe we should ask for a legal consult on this, since I have heard many rumors of expensive cease and desist orders, when this was not done right...
The whole platform is hosted on Microsoft Azure, so there should no additional burden if the logins are hosted on Azure, too.
We could also reuse next-auth/ https://authjs.dev/ now that it is framework-agnostic: https://github.com/nextauthjs/next-auth/discussions/3942#discussioncomment-4402799 (there are plans for a nuxt module, but I'm not sure about the status)
Another alternative: http://sidebase.io/nuxt-auth/getting-started
h3 now also has native session support, https://github.com/unjs/h3/pull/315. At the very least, this should be used over express-session.
Another alternative is https://supertokens.com/
With https://github.com/JabRef/JabRefOnline/pull/2242, we are now using lucia.
The biggest contender is nextauth /auth.js but their login with credentials workflow is just way too limited. Lucia offers a lot of flexibility in this regard.
Azure Active Directory B2C provides a lot of the user management stuff out of the box and the pricing is acceptable.
There are some negative reports like
but these come from a) different needs than what b2c is providing and b) frustration with "Custom policy". So we try to avoid the latter ;-).
Another disadvantage is that the customization of the ui is a bit cumbersome via css, so we need to partly re-implement the user login/register/pwd forget pages: https://docs.microsoft.com/en-us/azure/active-directory-b2c/customize-ui?pivots=b2c-user-flow
Implementation:
Alternatives: