mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 03:31:27 +00:00
Update login with multiple auth methods to toggle button and logic
This commit is contained in:
@@ -407,10 +407,8 @@ export const validateProviderAuthToken = async ({
|
||||
jwt.verify(providerAuthToken, await getJwtProviderAuthSecret())
|
||||
);
|
||||
|
||||
let authProviders = [...(user.authProviders || []), user.authProvider];
|
||||
|
||||
if (
|
||||
!authProviders.includes(decodedToken.authProvider) ||
|
||||
!user.authMethods.includes(decodedToken.authProvider) ||
|
||||
decodedToken.email !== email
|
||||
) {
|
||||
throw new Error("Invalid authentication credentials.")
|
||||
|
||||
Reference in New Issue
Block a user