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
@@ -17,6 +17,7 @@ export interface IsCliLoginSuccessful {
email: string; email: string;
privateKey: string; privateKey: string;
JWTToken: string; JWTToken: string;
JTWToken: string; // CLI Versions 0.41.85 and below expect "JTWToken"
}; };
success: boolean; success: boolean;
} }
@@ -131,7 +132,8 @@ const attemptLogin = async ({
loginResponse: { loginResponse: {
email, email,
privateKey, privateKey,
JWTToken: token JWTToken: token,
JTWToken: token // CLI Versions 0.41.85 and below expect "JTWToken"
}, },
success: true success: true
}); });
@@ -15,6 +15,7 @@ interface IsMfaLoginSuccessful {
loginResponse: { loginResponse: {
privateKey: string; privateKey: string;
JWTToken: string; JWTToken: string;
JTWToken: string; // CLI Versions 0.41.85 and below expect "JTWToken"
}; };
} }
@@ -95,7 +96,8 @@ const attemptLoginMfa = async ({
success: true, success: true,
loginResponse: { loginResponse: {
privateKey, privateKey,
JWTToken: token JWTToken: token,
JTWToken: token // CLI Versions 0.41.85 and below expect "JTWToken"
} }
}); });
} catch (err) { } catch (err) {
@@ -97,6 +97,7 @@ export const PasswordStep = ({
privateKey, privateKey,
email, email,
JWTToken: token, JWTToken: token,
JTWToken: token, // CLI Versions 0.41.85 and below expect "JTWToken"
refreshToken refreshToken
}; };
await instance.post(cliUrl, payload).catch(() => { await instance.post(cliUrl, payload).catch(() => {
@@ -210,6 +211,7 @@ export const PasswordStep = ({
const payload = { const payload = {
...isCliLoginSuccessful.loginResponse, ...isCliLoginSuccessful.loginResponse,
JWTToken: token, JWTToken: token,
JTWToken: token, // CLI Versions 0.41.85 and below expect "JTWToken"
refreshToken refreshToken
}; };
await instance.post(cliUrl, payload).catch(() => { await instance.post(cliUrl, payload).catch(() => {
@@ -150,6 +150,7 @@ export const SelectOrganizationSection = () => {
const payload = { const payload = {
JWTToken: token, JWTToken: token,
JTWToken: token, // CLI Versions 0.41.85 and below expect "JTWToken"
email: user?.email, email: user?.email,
privateKey, privateKey,
refreshToken refreshToken