AuthProvider

AuthProvider

Interface declaration for Authentication Providers

Methods

authenticate(options)

Called when _linkWith isn't passed authData. Handle your own authentication here.

Parameters:
Name Type Description
options object

options.success(provider, authData) or options.error(provider, error) on completion

deauthenticate()

(Optional) Called when service is unlinked. Handle any cleanup here.

getAuthType() → {string}

Unique identifier for this Auth Provider.

Returns:
Type:
string

identifier

restoreAuthentication(authData) → {boolean}

Called when auth data is syncronized. Can be used to determine if authData is still valid

Parameters:
Name Type Description
authData object

Data used when register provider

Returns:
Type:
boolean

Indicate if service should continue to be linked