Merge pull request #3827 from Infisical/fix/cli-jwt-issue

Fix CLI issue
This commit is contained in:
Maidul Islam
2025-06-19 17:33:37 -04:00
committed by GitHub
4 changed files with 9 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ export interface IsCliLoginSuccessful {
email: string;
privateKey: string;
JWTToken: string;
JTWToken: string; // CLI Versions 0.41.85 and below expect "JTWToken"
};
success: boolean;
}
@@ -131,7 +132,8 @@ const attemptLogin = async ({
loginResponse: {
email,
privateKey,
JWTToken: token
JWTToken: token,
JTWToken: token // CLI Versions 0.41.85 and below expect "JTWToken"
},
success: true
});

View File

@@ -15,6 +15,7 @@ interface IsMfaLoginSuccessful {
loginResponse: {
privateKey: string;
JWTToken: string;
JTWToken: string; // CLI Versions 0.41.85 and below expect "JTWToken"
};
}
@@ -95,7 +96,8 @@ const attemptLoginMfa = async ({
success: true,
loginResponse: {
privateKey,
JWTToken: token
JWTToken: token,
JTWToken: token // CLI Versions 0.41.85 and below expect "JTWToken"
}
});
} catch (err) {

View File

@@ -97,6 +97,7 @@ export const PasswordStep = ({
privateKey,
email,
JWTToken: token,
JTWToken: token, // CLI Versions 0.41.85 and below expect "JTWToken"
refreshToken
};
await instance.post(cliUrl, payload).catch(() => {
@@ -210,6 +211,7 @@ export const PasswordStep = ({
const payload = {
...isCliLoginSuccessful.loginResponse,
JWTToken: token,
JTWToken: token, // CLI Versions 0.41.85 and below expect "JTWToken"
refreshToken
};
await instance.post(cliUrl, payload).catch(() => {

View File

@@ -150,6 +150,7 @@ export const SelectOrganizationSection = () => {
const payload = {
JWTToken: token,
JTWToken: token, // CLI Versions 0.41.85 and below expect "JTWToken"
email: user?.email,
privateKey,
refreshToken