Skip to content

Instantly share code, notes, and snippets.

@pawarakesh
pawarakesh / post_login_action_to_collect_email.js
Created September 5, 2025 12:00
auth0_post_login_action_to_collect_email
exports.onExecutePostLogin = async (event, api) => {
// Check if user already has an email
if (!event.user.email) {
// Render your custom form (from Step 1)
api.prompt.render('collect-email-form');
}
};
exports.onContinuePostLogin = async (event, api) => {
// Grab the submitted email from the form