Update redirect to org after SSO

This commit is contained in:
Tuan Dang
2023-12-14 23:07:22 +07:00
parent 8e0f424249
commit 51b788cc5b
5 changed files with 16 additions and 6 deletions
@@ -78,6 +78,7 @@ export const MFAStep = ({
let isLinkingRequired: undefined | boolean;
let callbackPort: undefined | string;
let authMethod: undefined | AuthMethod;
let organizationId: undefined | string;
if (providerAuthToken) {
const decodedToken = jwt_decode(providerAuthToken) as any;
@@ -85,6 +86,7 @@ export const MFAStep = ({
isLinkingRequired = decodedToken.isLinkingRequired;
callbackPort = decodedToken.callbackPort;
authMethod = decodedToken.authMethod;
organizationId = decodedToken?.organizationId;
}
if (mfaCode.length !== 6) {
@@ -142,7 +144,7 @@ export const MFAStep = ({
});
}
await navigateUserToOrg(router);
await navigateUserToOrg(router, organizationId);
} else {
createNotification({
text: "Failed to log in",