-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: authenticationProviders API endpoints #1962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -0,0 +1,52 @@ | |||
// @flow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍖 New API routes
|
||
const log = debug("server"); | ||
const app = new Koa(); | ||
const router = new Router(); | ||
|
||
router.use(passport.initialize()); | ||
|
||
// dynamically load available authentication providers | ||
requireDirectory(__dirname).forEach(([{ default: provider, config }]) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were multiple places this require loop happened, now it happens once in ./providers
and is imported elsewhere
@@ -0,0 +1,31 @@ | |||
// @flow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍖 Policies for authentication providers
guard against disabling all auth methods
This PR provides the foundation for #1945, allowing the listing and disabling of individual authentication providers.
/auth/providers
folder (view without whitespace changes)authenticationProviders.list
endpoint to list auth providers with team statusauthenticationProviders.info
endpointauthenticationProviders.update
endpoint to enable and disable