Skip to main content

generateCode

Getting the code to activate the user

You can use this feature if it is enabled in the admin panel

Description

This method requests generation of an activation code for the user. The code is delivered through the corresponding notification channel (email/SMS) configured in the admin panel. It returns a Promise that resolves to void on success.

AuthProvider.generateCode(

marker*, userIdentifier*, eventIdentifier*

);

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

Examples

Minimal example

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