Managing authenticators
Displaying the self-service authentication management screens
Once the user is enrolled, you might want to show a button which presents them with the option to manage their existing authentication methods through the Authsignal pre-built UI.
You can do this by tracking an action and setting the redirectToSettings
param to true
to let the user remain on the Authsignal pre-built UI after completing a challenge.
- cURL
- Node.js
- Ruby
- Python
- PHP
curl https://api.authsignal.com/v1/users/usr_123/actions/manage \
-u YOUR_SECRET_KEY: \
-H "Content-Type: application/json" \
-d '{"redirectUrl": "https://example.app", "redirectToSettings": true}'
const { url } = await authsignal.track({
action: "manage",
userId: "usr_123",
redirectUrl: "https://example.app",
redirectToSettings: true,
});
result = Authsignal.track({
action: "manage",
user_id: "usr_123",
redirect_url: "https://example.app",
redirect_to_settings: true
}
)
result = authsignal_client.track_action(
action="manage",
user_id="usr_123",
payload={
"redirectUrl": "https://www.example.app",
"redirectToSettings": true
}
)
$payload = array("redirectUrl" => $redirectUrl, "redirectToSettings" => true));
$result = Authsignal::track(action: "manage",
userId: "usr_123",
payload: $payload);
You can pass "manage" for the name of the action tracked here or a different value if you like. This value just determines what the action will be called when viewing it in the Authsignal Portal.
The redirectUrl
you provide here is where users will be redirected back to in your application once they leave the Authsignal pre-built UI.
For security reasons, enrolled users will always be prompted to complete a challenge before they're able to manage their authentication methods.
Once the user has completed a challenge, they will then be able to enroll additional authenticators and edit their existing authenticators.