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!