Open JavertArdo opened 2 months ago
Hey @JavertArdo 👋🏻
yeah, been thinking along the same lines for a while. most of the homelab users who want to self-host their SSO solution usually tend to go with GitLab. Authentik is a good suggestion as they already seem to have a NextAuth.js provider https://next-auth.js.org/providers/authentik and the Oauth2 implementation seems straight forward https://goauthentik.io/docs/providers/oauth2.
classic username + password + 2fa auth is going to require a non-trivial rewrite of our sign up, sign in and account recovery modules. but we have it on our roadmap.
Is your feature request related to a problem?
In self-hosted environment some of the enthusiasts use many other SSO providers like Authentik or Authelia. In the current implementation there are only three options available: Google, GitHub and Gitlab. Only one of them in theory could be hosted in own lab environment (if we talking about something like community editions of the software). The other two are managed by external organizations. These three mentioned SSO providers may not be the most suitable options for self managed use case. Some of the developers may not want to link with external accounts, if they self-host everything or if they want to simply test out the software locally.
Describe the solution you'd like
Could it be possible to add other provider options? From what I see in the code, Phase uses
next-auth
library which contains many other provider configurations e.g. Authentik. The other option, if addition of specific providers is tedious, could be to let the user configure custom provider NextAuth.js: Using a custom provider in more flexible manner. For example to load custom provider configuration from.js
file.Describe alternatives you've considered
Implement classic user registration/login form instead of configuring SSO provider.