Custom Signup Prompt Data Missing in Create Script With Passkeys Enabled

Overview

When using Passkeys with a Custom Database that has Import Mode: Off, the Create script for the custom database may be relying on profile data from custom signup prompts in the ‘signup-password’ screen that appears to be missing. This article will cover why this is happening.

Applies To

Cause

When Passkeys are enabled for a Custom Database connection that has Import Mode off, the Create script will execute when the user clicks “Create a Passkey”:

After the Passkey is created, the signup flow is completed, and the user will not see the signup-password screen. If the “Create” script for the Custom Database is expecting any data from Custom Signup Prompts, it will be missing and can potentially lead to errors.

Solution

To resolve this, the Custom Signup Prompts can be moved from the signup-password prompt to the signup-id prompt. They will then be available in the “Create” script of the Custom Database.

For example, this login page is using Partials to collect a “full_name” attribute for the user profile on the signup-password screen:

This is done by setting the following Partial with the PUT /api/v2/prompts/{prompt}/partials endpoint of the Management API:

{
  "signup-password": {
    "form-content-end": "<div class='ulp-field'><input type='text' name='ulp-full-name' id='full-name'><label for='full-name'>Full Name</label></div>"
  }
}

Since newly registering Passkey users will not see this screen, they will not have an opportunity to enter their Full Name.

By moving this “Full Name” field to the signup-id prompt, new Passkey users will have an opportunity to enter their full name:

{
  "signup-id": {
    "form-content-end": "<div class='ulp-field'><input type='text' name='ulp-full-name' id='full-name'><label for='full-name'>Full Name</label></div>"
  }
}

In this example, the user’s form data will be available in the Custom Database’s “Create” script with user.form.ulp-full-name.