diff --git a/frontend/src/components/utilities/attemptCliLogin.ts b/frontend/src/components/utilities/attemptCliLogin.ts index 914a4c266..f677bc5ed 100644 --- a/frontend/src/components/utilities/attemptCliLogin.ts +++ b/frontend/src/components/utilities/attemptCliLogin.ts @@ -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 }); diff --git a/frontend/src/components/utilities/attemptCliLoginMfa.ts b/frontend/src/components/utilities/attemptCliLoginMfa.ts index 2a5de18dd..348c5f942 100644 --- a/frontend/src/components/utilities/attemptCliLoginMfa.ts +++ b/frontend/src/components/utilities/attemptCliLoginMfa.ts @@ -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) { diff --git a/frontend/src/pages/auth/LoginPage/components/PasswordStep/PasswordStep.tsx b/frontend/src/pages/auth/LoginPage/components/PasswordStep/PasswordStep.tsx index e175ef7f2..74d4e6509 100644 --- a/frontend/src/pages/auth/LoginPage/components/PasswordStep/PasswordStep.tsx +++ b/frontend/src/pages/auth/LoginPage/components/PasswordStep/PasswordStep.tsx @@ -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(() => { diff --git a/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx b/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx index ead8b1401..9cd13a6cc 100644 --- a/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx +++ b/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx @@ -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