Skip to main content

checkCode

Checking the user activation code.

Description

This method checks the user's code. Returns true (if the code is correct) or false (if it is incorrect). It returns a Promise that resolves to a boolean value.

AuthProvider.checkCode(

marker*, userIdentifier*, eventIdentifier*, code*

);

Parameters schema

Schema

marker:* string
The text identifier of the authorization provider.
example: email

userIdentifier:* string
The text identifier of the user's object (user login)
example: example@oneentry.cloud

eventIdentifier:* string
Text identifier of the event object for which the code is generated
example: auth

code:* string
Service code
example: WTGC9E

Examples

Minimal example

const response = await AuthProvider.checkCode('email', 'example@oneentry.cloud', 'auth', 'WTGC9E');

Example response

true

Try it live

Run this method interactively in the JS SDK sandbox — connect your Project URL and App Token on first visit, then open:

  • Password reset — verify the code the user received via email or SMS before resetting their password.