AuthAdapter

Properties
NameTypeDescription
enabledBoolean

Is true if the auth adapter is enabled, false otherwise.

Methods

afterFind(authData, options) → {Promise.<Object>}

Triggered when auth data is fetched

Parameters:
NameTypeDescription
authDataObject

authData

optionsObject

additional adapter options

Returns:

Any overrides required to authData

Type: 
Promise.<Object>

challenge(challengeData, authData, options, request) → {Promise.<Object>}

Triggered in pre authentication process if needed (like webauthn, SMS OTP)

Parameters:
NameTypeDescription
challengeDataObject

Data provided by the client

authDataObject | undefined

Auth data provided by the client, can be used for validation

optionsObject

additional adapter options

requestParse.Cloud.TriggerRequest
Returns:

A promise that resolves, resolved value will be added to challenge response under challenge key

Type: 
Promise.<Object>

validateAppId(appIds, authData, options, request) → {Promise.<(undefined|void)>|void|undefined}

Parameters:
NameTypeDescription
appIds

The specified app IDs in the configuration

authDataObject

The client provided authData

optionsObject

additional adapter options

requestParse.Cloud.TriggerRequest
Returns:

resolves or returns if the applicationId is valid

Type: 
Promise.<(undefined|void)> | void | undefined

validateAuthData(authData, request, options) → {Promise.<(ParseAuthResponse|void|undefined)>}

Legacy usage, if provided it will be triggered when authData related to this provider is touched (signup/update/login) otherwise you should implement validateSetup, validateLogin and validateUpdate

Parameters:
NameTypeDescription
authDataObject

The client provided authData

requestParse.Cloud.TriggerRequest
optionsObject

additional adapter options

Returns:
Type: 
Promise.<(ParseAuthResponse|void|undefined)>

validateLogin(authData, request, options) → {Promise.<(ParseAuthResponse|void|undefined)>}

Triggered when user provide authData related to this provider The user is not logged in and has already set this provider before

Parameters:
NameTypeDescription
authDataObject

The client provided authData

requestParse.Cloud.TriggerRequest
optionsObject

additional adapter options

Returns:
Type: 
Promise.<(ParseAuthResponse|void|undefined)>

validateOptions(options)

Triggered when the adapter is first attached to Parse Server

Parameters:
NameTypeDescription
optionsObject

Adapter Options

validateSetUp(authData, request, options) → {Promise.<(ParseAuthResponse|void|undefined)>}

Triggered when user provide for the first time this auth provider could be a register or the user adding a new auth service

Parameters:
NameTypeDescription
authDataObject

The client provided authData

requestParse.Cloud.TriggerRequest
optionsObject

additional adapter options

Returns:
Type: 
Promise.<(ParseAuthResponse|void|undefined)>

validateUpdate(authData, options, request) → {Promise.<(ParseAuthResponse|void|undefined)>}

Triggered when user provide authData related to this provider the user is logged in and has already set this provider before

Parameters:
NameTypeDescription
authDataObject

The client provided authData

optionsObject

additional adapter options

requestParse.Cloud.TriggerRequest
Returns:
Type: 
Promise.<(ParseAuthResponse|void|undefined)>