Cannot set AppMetadata or UserMetaData in Passwordless flow with Pre-registration Action / Hook
Last Updated:
Overview
This article explains why using extensibility to write metadata before registration with a passwordless connection does not work.
Applies To
- Extensibility
- Passwordless Connections
Cause
It is not supported to use the pre-registration Action with passwordless connections because it works differently than with the other connection types.
Solution
To add the metadata for this connection type, use a Post-Login Action.
- It is also possible to add a condition to check in a Post Login Action to filter whether the connection is passwordless so it is not executed with others.
- Do this by filtering the objects within event.authentication.methods array with this structure:
[{name: "sms" | name:"email"}]