chore: Move remaining auth methods to plugins (#4900)
* Move Google, Email, and Azure to plugins * Move OIDC provider, remove old loading code * Move AuthLogo to plugin * AuthLogo -> PluginIcon * Lazy load plugin settings
This commit is contained in:
14
docs/AUTHENTICATION_PROVIDERS.md
Normal file
14
docs/AUTHENTICATION_PROVIDERS.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Authentication Providers
|
||||
|
||||
A new auth provider can be added with the addition of a plugin with a koa router
|
||||
as the default export in /server/auth/[provider].ts and (optionally) a matching
|
||||
logo in `/client/Icon.tsx` that will appear on the sign-in button.
|
||||
|
||||
Auth providers generally use [Passport](http://www.passportjs.org/) strategies,
|
||||
although they can use any custom logic if needed. See the `google` auth provider
|
||||
for the cleanest example of what is required – some rules:
|
||||
|
||||
- The strategy name _must_ be lowercase
|
||||
- The strategy _must_ call the `accountProvisioner` command in the verify callback
|
||||
- The auth file _must_ export a `config` object with `name` and `enabled` keys
|
||||
- The auth file _must_ have a default export with a koa-router
|
||||
Reference in New Issue
Block a user