Signing users up
Learn how to sign users up using the GoPasswordless SDK
Sign up flow
GoPasswordless provides a simple, two step signup flow to register a passkey for the user and verify the user’s email address.
Step 1: Begin Registration
The first step is to call the beginRegistration
function. This function uses WebAuthn to set up a passkey on the user’s device and then
registeres that the public key with GoPasswordless. It the returns a token that you will need for the next step.
WebAuthn passkeys are scoped to a top level domain. GoPasswordless verifies that the passkey being used for registration matches the domain linked to your app and rejects the registration request if it doesn’t.
Step 2: Complete Registration
If step 1 is successful, the user will receive a verification code via email. Provide an input to collect this code from the user somewhere
and then call the completeRegistration
function with this verification code and the token from step 1. If the verifcation code is correct
and the signup token is valid, the response will contain an access token that you can use to authenticate the user in your app.
Was this page helpful?