activateUser
Activate a user.
Description
Activates a user with the one-time code sent after signUp() when the auth provider requires code confirmation (or resent with generateCode()). The method checks the code itself, so you don't need to call checkCode() first.
Resolves to true when the user is activated. Otherwise it resolves to an IError: 400 for an unknown user, an already active user, or a wrong or expired code; 404 if the auth provider marker doesn't exist or the provider is inactive; 429 after five wrong code attempts, when the code is invalidated and a new one must be requested with generateCode().
.activateUser(
,
,
);
Parameters schema
Schema
marker(required): string
Marker of the auth provider.
example: "email"
userIdentifier(required): string
Identifier (login) of the user, such as an email address.
example: "john@example.com"
code(required): string
One-time code the user received.
example: "123456"
Examples
Minimal example
const response = await AuthProvider.activateUser('email', 'john@example.com', '123456');
Example response
true