From 3aa7935fc0776aaead7fe0ee52b93483db73c311 Mon Sep 17 00:00:00 2001 From: Pete Nicholls Date: Thu, 11 Apr 2024 10:09:49 +1200 Subject: [PATCH] Use chance.auth0().tenantId() consistently --- src/mock/events/post-challenge.ts | 2 +- src/mock/events/post-login.ts | 2 +- src/mock/events/pre-user-registration.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mock/events/post-challenge.ts b/src/mock/events/post-challenge.ts index c3bc7e6..4a05c49 100644 --- a/src/mock/events/post-challenge.ts +++ b/src/mock/events/post-challenge.ts @@ -13,7 +13,7 @@ import { identity } from "../identity"; export const postChallenge = define( ({ params }) => { - const tenantId = params.tenant?.id || chance.n(chance.word, 2).join("-"); + const tenantId = params.tenant?.id || chance.auth0().tenantId(); const hostname = params.request?.hostname || `${tenantId}.auth0.com`; const connectionValue = params.connection diff --git a/src/mock/events/post-login.ts b/src/mock/events/post-login.ts index 1f78997..0ae99d2 100644 --- a/src/mock/events/post-login.ts +++ b/src/mock/events/post-login.ts @@ -12,7 +12,7 @@ import { chance } from "../chance"; import { identity } from "../identity"; export const postLogin = define(({ params }) => { - const tenantId = params.tenant?.id || chance.n(chance.word, 2).join("-"); + const tenantId = params.tenant?.id || chance.auth0().tenantId(); const hostname = params.request?.hostname || `${tenantId}.auth0.com`; const connectionValue = params.connection diff --git a/src/mock/events/pre-user-registration.ts b/src/mock/events/pre-user-registration.ts index 0ed189b..2a55314 100644 --- a/src/mock/events/pre-user-registration.ts +++ b/src/mock/events/pre-user-registration.ts @@ -12,7 +12,7 @@ import { identity } from "../identity"; export const preUserRegistration = define( ({ params }) => { - const tenantId = params.tenant?.id || chance.n(chance.word, 2).join("-"); + const tenantId = params.tenant?.id || chance.auth0().tenantId(); const hostname = params.request?.hostname || `${tenantId}.auth0.com`; const connectionValue = params.connection