
A push authentication request displayed on a mobile device.
- Registering a mobile device for push authentication by adding a device credential. This step creates a new public/private key pair.
- Responding to an authentication request by approving or rejecting a device challenge. This step uses the device’s private key to sign a message which is verified on the server using the public key.
Although push authentication involves sending a push notification to a mobile app, the push
notification is not part of the authentication mechanism and delivery is not required for the
method to work. The push notification is only used to help prompt the user to open the app - if it
doesn’t arrive, they can still open the app manually.
Sequence diagram
The diagram below illustrates the sequence for a push authentication challenge.Configure push in the Authsignal Portal
Enable the device credential authentication method for your tenant and configure a webhook for sending push notifications.
Grab your Authsignal credentials
Head to Settings and grab your Tenant ID, API URL and API secret key. Add them as environment variables in your project:Implementing registration
1. Backend - Generate registration token
Track an action (e.g. “addAuthenticator”) to generate a short-lived token which can be used to authorize adding a new authentication method for a user.2. Mobile app - Add device credential
Use the token obtained in step 1 to register a new device credential in the app.Device registration should be implemented after login or when the app is launched in an
authenticated state. Registration tokens should only ever be generated for authenticated users in
order to ensure a strong binding between
authentication methods.
Implementing authentication
1. Backend - Track an action
When a user performs an action that requires push authentication, your backend should track an action (e.g. “signIn”) using our Server SDK or Server API.- Custom UI
- Pre-built UI
Learn more about the different action outcomes.
2. Web app - Challenge the user
- Custom UI
- Pre-built UI
Use our Web SDK or Client API to initiate a push challenge.
This will trigger a call to your webhook with the push event schema so that it can send the user a push notification.
Start a push challenge
Poll for the challenge result
Poll for the challenge result using our Web SDK, Mobile SDKs or Client API.3. Mobile app - Check for pending challenge
Use the mobile SDK’s Get Challenge method to check if there is a pending challenge for the device.4. Mobile app - Present challenge
If there is a pending challenge, present a dialog to allow the user to approve or reject the challenge. To approve or reject the challenge, use the mobile SDK’s Update Challenge method.5. Backend - Complete authentication
Once the challenge is approved, the polling request in step 2 will return a token that should be passed to your backend to validate the challenge in order to complete the authentication flow.Next steps
- Adaptive MFA - Set up smart rules to trigger authentication based on risk
- QR code - Implement QR code authentication
- Trusted device - Implement trusted device authentication
- Passkeys - Offer the most secure and user-friendly passwordless authentication