mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 12:04:03 +00:00
added user controller and modified auth method page
This commit is contained in:
@@ -57,6 +57,24 @@ router.patch(
|
||||
usersController.updateAuthProvider
|
||||
);
|
||||
|
||||
router.put(
|
||||
"/me/auth-providers",
|
||||
requireAuth({
|
||||
acceptedAuthModes: [AUTH_MODE_JWT, AUTH_MODE_API_KEY],
|
||||
}),
|
||||
body("authProviders").exists().isArray({
|
||||
min: 1,
|
||||
}).custom((authProviders: AuthProvider[]) => {
|
||||
return authProviders.every(provider => [
|
||||
AuthProvider.EMAIL,
|
||||
AuthProvider.GOOGLE,
|
||||
AuthProvider.GITHUB
|
||||
].includes(provider))
|
||||
}),
|
||||
validateRequest,
|
||||
usersController.updateAuthProviders,
|
||||
);
|
||||
|
||||
router.get(
|
||||
"/me/organizations",
|
||||
requireAuth({
|
||||
|
||||
Reference in New Issue
Block a user