Pre-Fill User Details
The Flash Subscription allows you to streamline user experience by pre-filling subscription forms with data like email, Nostr ID (npub), and a unique identifier, external_uuid, when redirecting users to the subscription page. This saves users from re-entering details and enables you to integrate smoothly with your own user management systems.
URL Parameters
When redirecting users to the Flash subscription page, you can pass relevant user information in the URL through a Base64-encoded JSON object. The system will automatically pre-fill the subscription form based on these values.
Parameters you can pass:
email: The user's email address.
npub: The user's Nostr public key (Npub).
external_uuid: A unique identifier from your system to map users in your backend with Flash APIs. This value is not visible to users and is only used internally for identification.
is_verified: A boolean value indicating whether the user's email or Npub has already been verified.
If set to
false
, Flash will handle the verification process by either sending an email (for email addresses) or a Nostr DM (for Npubs) with a verification token.If set to
true
, no additional verification steps are required, and the subscription process will continue seamlessly.
How to Pass Parameters
You can pass the following parameters by embedding them as a Base64-encoded JSON object in the params
query string:
The resulting URL might look like this:
When Flash receives this URL, the system decodes the parameters and pre-populates the subscription form with the provided data.
How Flash Uses These Parameters:
Pre-Filled Fields: The user's email or Npub will be automatically filled into the form.
Verification:
If the user is not verified (i.e.,
is_verified = false
), Flash will initiate the verification process by sending a verification token:Email: The user will receive a token via email.
Npub: The user will receive a token via Nostr DM.
The user will then input the received token into the interface to verify their identity.
Note: The
external_uuid
parameter is designed for developers to map their own user IDs with the Flash system, making it easy to track and manage users across platforms. This value is not shown to users.
Example Workflow
Set Up the Redirect: Pass the user's email, Npub, and external UUID in the URL as described above.
Pre-Filled Form: The subscription page will pre-fill the user's details.
Verification (if required): If the user isn't verified, Flash sends a token via email or Nostr DM, which the user will input to complete verification.
Subscription Completed: Once verified, the user can complete their subscription without re-entering details.
Last updated