- Connected accounts (link/unlink external identity providers)
- MFA factors
- Authentication methods (passkeys, phone, email, TOTP) - list, get, update, delete
- Authentication method enrollment (challenge and verify)
Constructor
Parameters
string
required
Returns
MyAccountApiClient
Methods
completeAccount()
Parameters
CompleteRequest
required
Completion parameters including auth session, connect code, and redirect URIType: CompleteRequest
Returns
Promise<CompleteResponse>
A promise that resolves to the completed connected account details
connectAccount()
Parameters
ConnectRequest
required
Connection parameters including connection name and redirect URIType: ConnectRequest
Returns
Promise<ConnectResponse>
A promise that resolves to a connect response with the redirect URI and auth session
deleteAuthenticationMethod()
Parameters
string
required
The ID of the authentication method to delete
Returns
Promise<void>
A promise that resolves when the authentication method has been deleted
enrollmentChallenge()
Parameters
EnrollmentChallengeOptions
required
Enrollment challenge options specifying the factor type and any type-specific fieldsType: EnrollmentChallengeOptions
Returns
Promise<EnrollmentChallengeResponse>
A promise that resolves to the enrollment challenge response (shape varies by type)
enrollmentVerify()
Parameters
EnrollmentVerifyOptions
required
Enrollment verify options including the auth session and type-specific verification dataType: EnrollmentVerifyOptions
Returns
Promise<AuthenticationMethod>
A promise that resolves to the confirmed authentication method
getAuthenticationMethod()
Parameters
string
required
The ID of the authentication method to retrieve
Returns
Promise<AuthenticationMethod>
A promise that resolves to the authentication method
getAuthenticationMethods()
Parameters
AuthenticationMethodType
Optional filter to return only methods of a specific typeType: AuthenticationMethodType
Returns
Promise<AuthenticationMethod[]>
A promise that resolves to an array of authentication methods
getFactors()
Returns
Promise<Factor[]>
A promise that resolves to an array of factors with their enabled/disabled status
updateAuthenticationMethod()
Parameters
string
required
The ID of the authentication method to update
UpdateAuthenticationMethodRequest
required
The fields to update (e.g. name, preferred_authentication_method for phone)Type: UpdateAuthenticationMethodRequest
Returns
Promise<AuthenticationMethod>
A promise that resolves to the updated authentication method