Skip to main content

Get Authenticators

API schema

This method lets you retrieve a list of the authenticators that a user currently has enrolled.
const request = {
  userId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
};

const authenticators = await authsignal.getAuthenticators(request);

Enroll Verified Authenticator

API schema

This method lets you enroll an email or SMS-based authenticator for a user whose email address or phone number has already been verified via an external platform.
const request = {
  userId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
  attributes: {
    verificationMethod: VerificationMethod.SMS,
    phoneNumber: "+64270000000",
  },
};

const response = authsignal.enrollVerifiedAuthenticator(request);
This method should not be used if you haven’t yet verified the user’s email or phone number. It does not send out an email / SMS to initiate a verification process - if you need to verify an email address or phone number, you should use the Web SDK, Mobile SDK, or the pre-built UI.

Delete Authenticator

API schema

This method lets you remove an authenticator that a user has previously enrolled.
const request = {
  userId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
  userAuthenticatorId: "bf287470-24d9-4aa4-8b29-85683bea703f",
};

await authsignal.deleteAuthenticator(request);