mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-13 22:29:33 +00:00
Add orgId to reuse login1/login2 logic for LDAP 2nd step login
This commit is contained in:
@@ -21,10 +21,12 @@ interface IsLoginSuccessful {
|
||||
*/
|
||||
const attemptLogin = async ({
|
||||
email,
|
||||
orgId,
|
||||
password,
|
||||
providerAuthToken
|
||||
}: {
|
||||
email: string;
|
||||
orgId?: string;
|
||||
password: string;
|
||||
providerAuthToken?: string;
|
||||
}): Promise<IsLoginSuccessful> => {
|
||||
@@ -38,6 +40,7 @@ const attemptLogin = async ({
|
||||
|
||||
const { serverPublicKey, salt } = await login1({
|
||||
email,
|
||||
orgId,
|
||||
clientPublicKey,
|
||||
providerAuthToken
|
||||
});
|
||||
@@ -59,6 +62,7 @@ const attemptLogin = async ({
|
||||
tag
|
||||
} = await login2({
|
||||
email,
|
||||
orgId,
|
||||
clientProof,
|
||||
providerAuthToken
|
||||
});
|
||||
|
||||
@@ -25,12 +25,14 @@ export type VerifyMfaTokenRes = {
|
||||
|
||||
export type Login1DTO = {
|
||||
email: string;
|
||||
orgId?: string;
|
||||
clientPublicKey: string;
|
||||
providerAuthToken?: string;
|
||||
}
|
||||
|
||||
export type Login2DTO = {
|
||||
email: string;
|
||||
orgId?: string;
|
||||
clientProof: string;
|
||||
providerAuthToken?: string;
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ export const PasswordStep = ({
|
||||
} else {
|
||||
const loginAttempt = await attemptLogin({
|
||||
email,
|
||||
orgId: organizationId,
|
||||
password,
|
||||
providerAuthToken,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user