Improvements

This commit is contained in:
x032205
2025-06-19 17:26:58 -04:00
parent 73fe2659b5
commit 66df285245
5 changed files with 15 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ import "time"
type UserCredentials struct {
Email string `json:"email"`
PrivateKey string `json:"privateKey"`
JWTToken string `json:"JTWToken"`
JWTToken string `json:"JWTToken"`
RefreshToken string `json:"refreshToken"`
}

View File

@@ -16,7 +16,8 @@ export interface IsCliLoginSuccessful {
loginResponse?: {
email: string;
privateKey: string;
JTWToken: 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,
JTWToken: token
JWTToken: token,
JTWToken: token // CLI Versions 0.41.85 and below expect "JTWToken"
},
success: true
});

View File

@@ -14,7 +14,8 @@ interface IsMfaLoginSuccessful {
success: boolean;
loginResponse: {
privateKey: string;
JTWToken: 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,
JTWToken: token
JWTToken: token,
JTWToken: token // CLI Versions 0.41.85 and below expect "JTWToken"
}
});
} catch (err) {

View File

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

View File

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