Form is only working postLogin but not postUserRegistration

I created a Form a user should fill out after registering. In the form he should basically provide his name which will be added to user_metadata. If I create a post login action with this form it perfectly works.


exports.onExecutePostLogin = async (event, api) => {
  const FORM_ID = 'myFormId';

  api.prompt.render(FORM_ID);
}
exports.onContinuePostLogin = async (event, api) => {}

But if I try to do exactly the same with the same Form as a postUserRegistration action with belows code it does not work

exports.onExecutePostUserRegistration = async (event, api) => {
  const FORM_ID = 'myFormId';

  api.prompt.render(FORM_ID);
}

exports.onContinuePostUserRegistration = async (event, api) => {}

Instead of opening the form the user gets redirected straight to the app. Additionally I found this error log

TypeError on post-user-registration: Cannot read properties of undefined (reading ‘render’)

I don’t understand why the form works as a postLogin form but not as a postUserRegistration form.

I would be glad if someone has an idea, thanks in advance!

Hi @KjellBerlin

Welcome to the Auth0 Community!

Thank you for posting your question. Currently Forms for actions support only post-login action, but there are plans for support for other action triggers. There’s no ETA yet, but I will update you as soon as we’ll have one.

Thanks
Dawid

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.