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

View File

@@ -75,7 +75,7 @@ export const initializeSamlStrategy = async () => {
const organization = await Organization.findById(req.ssoConfig.organization);
if (!organization) return done(OrganizationNotFoundError());
const email = profile.email;
const firstName = profile.firstName;
const lastName = profile.lastName;
@@ -154,6 +154,7 @@ export const initializeSamlStrategy = async () => {
firstName,
lastName,
organizationName: organization?.name,
organizationId: organization?._id,
authMethod: req.ssoConfig.authProvider,
isUserCompleted,
...(req.body.RelayState ? {