diff --git a/cli/packages/models/cli.go b/cli/packages/models/cli.go index 9a3ff85b2..4785d81f1 100644 --- a/cli/packages/models/cli.go +++ b/cli/packages/models/cli.go @@ -5,7 +5,7 @@ import "time" type UserCredentials struct { Email string `json:"email"` PrivateKey string `json:"privateKey"` - JWTToken string `json:"JWTToken"` + JWTToken string `json:"JTWToken"` RefreshToken string `json:"refreshToken"` } diff --git a/frontend/src/components/utilities/attemptCliLogin.ts b/frontend/src/components/utilities/attemptCliLogin.ts index f677bc5ed..d897ebeaa 100644 --- a/frontend/src/components/utilities/attemptCliLogin.ts +++ b/frontend/src/components/utilities/attemptCliLogin.ts @@ -16,8 +16,7 @@ export interface IsCliLoginSuccessful { loginResponse?: { email: string; privateKey: string; - JWTToken: string; - JTWToken: string; // CLI Versions 0.41.85 and below expect "JTWToken" + JTWToken: string; }; success: boolean; } @@ -132,8 +131,7 @@ const attemptLogin = async ({ loginResponse: { email, privateKey, - JWTToken: token, - JTWToken: token // CLI Versions 0.41.85 and below expect "JTWToken" + JTWToken: token }, success: true }); diff --git a/frontend/src/components/utilities/attemptCliLoginMfa.ts b/frontend/src/components/utilities/attemptCliLoginMfa.ts index 348c5f942..14a61d817 100644 --- a/frontend/src/components/utilities/attemptCliLoginMfa.ts +++ b/frontend/src/components/utilities/attemptCliLoginMfa.ts @@ -14,8 +14,7 @@ interface IsMfaLoginSuccessful { success: boolean; loginResponse: { privateKey: string; - JWTToken: string; - JTWToken: string; // CLI Versions 0.41.85 and below expect "JTWToken" + JTWToken: string; }; } @@ -96,8 +95,7 @@ const attemptLoginMfa = async ({ success: true, loginResponse: { privateKey, - JWTToken: token, - JTWToken: token // CLI Versions 0.41.85 and below expect "JTWToken" + JTWToken: token } }); } 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 74d4e6509..ee8e334bf 100644 --- a/frontend/src/pages/auth/LoginPage/components/PasswordStep/PasswordStep.tsx +++ b/frontend/src/pages/auth/LoginPage/components/PasswordStep/PasswordStep.tsx @@ -96,8 +96,7 @@ export const PasswordStep = ({ const payload = { privateKey, email, - JWTToken: token, - JTWToken: token, // CLI Versions 0.41.85 and below expect "JTWToken" + JTWToken: token, refreshToken }; await instance.post(cliUrl, payload).catch(() => { @@ -210,8 +209,7 @@ export const PasswordStep = ({ const instance = axios.create(); const payload = { ...isCliLoginSuccessful.loginResponse, - JWTToken: token, - JTWToken: token, // CLI Versions 0.41.85 and below expect "JTWToken" + JTWToken: token, 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 9cd13a6cc..014b4b1dd 100644 --- a/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx +++ b/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx @@ -149,8 +149,7 @@ export const SelectOrganizationSection = () => { } const payload = { - JWTToken: token, - JTWToken: token, // CLI Versions 0.41.85 and below expect "JTWToken" + JTWToken: token, email: user?.email, privateKey, refreshToken