Steps for Pop Up Authentication Prompt
Show a popup to prompt users to authenticate using a Trusted Device before proceeding with a transaction or opening sensitive information
In this guide, we'll go over how to show a Pop Up that prompts the user to authenticate with their trusted device before moving forward with an action.
What you're building

Steps
Setup Cotter with your
API_KEY_IDand some config
Step 1: Setup Cotter
Include Javascript SDK
To use our Javascript SDK, include the script below in your HTML page.
Initialize Cotter
Initialize Cotter in your HTML page, below the script you imported above. For React apps, initialize this in index.html. You can use it later in any of your pages.
Configuration
Here's a basic configuration example:
Advanced Customization
Check out how you can customize the form and change the configuration.
Step 2: Show Cotter Auth Request Pop Up
To show the the popup
What we have so far
Step 3: Receive Event Response Callback
We will pass a JSON Object describing the Authentication Event to your OnSuccess function. The JSON Object will have the following format:
On this step, you should pass this payload to your backend together with any data you need to submit a transaction, or any other api calls to your server.
Validate Cotter's Event Response
Learn how to validate Cotter's event response here:
Validating Cotter's Event Responseπ You're done!
Next Steps
Customize your Pop Up prompt
Advanced Customization for Pop Up Authentication PromptLast updated