Skip to content

Commit bb4932e

Browse files
committed
fix: onboarding wizard url
1 parent e3e562e commit bb4932e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

web-assets/auth0/dev-tenant/rules/onboardingChecklist.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function (user, context, callback) {
9595

9696
if (data.length === 0) {
9797
// User doesn't have any traits with traitId onboarding_checklist and should be shown the onboarding wizard
98-
context.idToken[global.AUTH0_CLAIM_NAMESPACE + 'show_onboarding_wizard'] = false;
98+
context.idToken[global.AUTH0_CLAIM_NAMESPACE + 'show_onboarding_wizard'] = true;
9999
console.log('rule:onboarding-checklist:Setting show_onboarding_wizard to true', user);
100100
return callback(null, user, context);
101101
}
@@ -128,7 +128,7 @@ function (user, context, callback) {
128128

129129
// All checks failed - indicating user newly registered and needs to be shown the onboarding wizard
130130
console.log('rule:onboarding-checklist: set show_onboarding_wizard', user);
131-
context.idToken[global.AUTH0_CLAIM_NAMESPACE + 'show_onboarding_wizard'] = false;
131+
context.idToken[global.AUTH0_CLAIM_NAMESPACE + 'show_onboarding_wizard'] = true;
132132
return callback(null, user, context);
133133
} catch (e) {
134134
console.log("rule:onboarding-checklist:Error in fetching onboarding_checklist", e);

web-assets/js/setupAuth0WithRedirect.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const qs = (function (a) {
2424
const authSetup = function () {
2525

2626
let domain = 'auth.{{DOMAIN}}';
27+
28+
const onboardingWizardUrl = 'https://platform.{{DOMAIN}}/onboard';
2729
const clientId = '{{AUTH0_CLIENT_ID}}';
2830
const useLocalStorage = false;
2931
const useRefreshTokens = false;
@@ -232,8 +234,7 @@ const authSetup = function () {
232234

233235
const redirectToOnboardingWizard = function () {
234236
logger("redirect to onboarding wizard");
235-
const hostname = window.location.host.replace('www.', '');
236-
window.location = `https://platform.${hostname}/onboard`;
237+
window.location = onboardingWizardUrl;
237238
}
238239

239240
const redirectToApp = function () {

0 commit comments

Comments
 (0)