Skip to content

Commit 94280d6

Browse files
author
sachin-maheshwari
authored
Merge pull request #276 from rakibansary/feat/onboard-wizard
feat: onboarding_checklist
2 parents edbb95c + 5e63e39 commit 94280d6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

web-assets/auth0/dev-tenant/database/login.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ function login(handleOrEmail, password, callback) {
5454
handle:user.result.content.handle,
5555
roles: user.result.content.roles,
5656
email_verified: user.result.content.emailActive,
57+
created_at: user.result.content.createdAt
5758
});
5859
});
5960
}

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ function (user, context, callback) {
1515
handle = _.get(user, "nickname", null);
1616
}
1717

18-
const loginCount = _.get(context, "stats.loginsCount");
19-
console.log('rule:onboarding-checklist: loginCount', loginCount);
20-
18+
let createdAt = _.get(user, "created_at", null);
19+
console.log('rule:onboarding-checklist: user created at', createdAt);
20+
2121
const getToken = function(callback) {
2222
if (global.M2MToken) {
2323
console.log('rule:onboarding-checklist:M2M token is available');
@@ -116,6 +116,9 @@ function (user, context, callback) {
116116
}
117117
console.log('rule:onboarding-checklist:Setting redirectUrl', redirectUrl);
118118
return callback(null, user, context);
119+
}).catch(requestError => {
120+
console.log("rule:onboarding-checklist:Failed fetching onboarding_checklist with error", requestError);
121+
return callback(null, user, context);
119122
})
120123

121124
} catch (e) {

0 commit comments

Comments
 (0)