Revert back to JTWToken

This commit is contained in:
x032205
2025-06-19 18:55:41 -04:00
parent 66df285245
commit 9445f717f4
5 changed files with 8 additions and 15 deletions

View File

@@ -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"`
}

View File

@@ -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
});

View File

@@ -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) {

View File

@@ -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(() => {

View File

@@ -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