fix: move displayName into auth integrations

This commit is contained in:
Wyatt Johnson
2018-07-23 13:14:34 -06:00
parent 13d293b9aa
commit 4b5c7c1c7b
4 changed files with 16 additions and 22 deletions
@@ -131,7 +131,7 @@ export async function findOrCreateOIDCUser(
name,
nickname,
}: OIDCIDToken = validate(
tenant.auth.displayNameEnable
tenant.auth.integrations.oidc!.displayNameEnable
? OIDCDisplayNameIDTokenSchema
: OIDCIDTokenSchema,
token
@@ -57,7 +57,7 @@ export async function findOrCreateSSOUser(
// Unpack/validate the token content.
const { id, email, username, displayName, avatar }: SSOUserProfile = validate(
tenant.auth.displayNameEnable
tenant.auth.integrations.sso!.displayNameEnable
? SSODisplayNameUserProfileSchema
: SSOUserProfileSchema,
token.user