LoginBuilder

LoginBuilder

(private) new LoginBuilder()

Login utilities
Source:

Methods

__setDomain(domain) → {LoginBuilder}

Set domain application. Used in MSISDN flow only. TEMPORARY AND ONLY FOR TEST!
Parameters:
Name Type Description
domain String the application domain
Source:
Returns:
the same instance
Type
LoginBuilder

getCustomLoginFlow() → {CustomLoginFlow}

Create a custom login flow.
Source:
Returns:
Type
CustomLoginFlow

getEmailConfirmFlow() → {EmailConfirmFlow}

Create an email login flow.
Source:
Returns:
Type
EmailConfirmFlow

getEmailConfirmForgotFlow() → {EmailConfirmForgotFlow}

Create an email confirm forgot flow.
Source:
Returns:
Type
EmailConfirmForgotFlow

getEmailForgotFlow() → {EmailForgotFlow}

Create an email forgot flow.
Source:
Returns:
Type
EmailForgotFlow

getEmailLoginFlow() → {EmailLoginFlow}

Create an email login flow.
Source:
Returns:
Type
EmailLoginFlow

getEmailResendFlow() → {EmailResendFlow}

Create an email login flow.
Source:
Returns:
Type
EmailResendFlow

getEmailSignupFlow() → {EmailSignupFlow}

Create an email signup flow.
Source:
Returns:
Type
EmailSignupFlow

getExternalLoginFlow() → {ExternalLoginFlow}

Create an external login flow.
Source:
Returns:
Type
ExternalLoginFlow

getMSISDNPINForgotFlow() → {MSISDNPINForgotFlow}

Create a msisdn pin forgot flow.
Source:
Returns:
Type
MSISDNPINForgotFlow

getMSISDNPINLoginFlow() → {MSISDNPINLoginFlow}

Create a msisdn pin login flow.
Source:
Returns:
Type
MSISDNPINLoginFlow

getMSISDNURLoginFlow() → {MSISDNURLoginFlow}

Create a msisdn login flow.
Source:
Returns:
Type
MSISDNURLoginFlow

getOAuthLoginFlow() → {OAuthLoginFlow}

Create a custom login flow.
Source:
Returns:
Type
OAuthLoginFlow

setAccessToken(access_token) → {LoginBuilder}

Set access token from oauth.
Parameters:
Name Type Description
access_token String The access token given
Source:
Returns:
the same instance
Type
LoginBuilder

setAllowCustomLogin() → {LoginBuilder}

Persist the custom login among the page refreshing. A session cookie is set.
Source:
Returns:
the same instance
Type
LoginBuilder

setCustomData(loginData) → {LoginBuilder}

Set login data. Useful to track campaign parameters
Parameters:
Name Type Description
loginData Newton.SimpleObject the custom data for the login event
Source:
Returns:
the same instance
Type
LoginBuilder

setCustomID(customID) → {LoginBuilder}

Set custom id. Used in custom flow only.
Parameters:
Name Type Description
customID String custom user id
Source:
Returns:
the same instance
Type
LoginBuilder

setEmail(email) → {LoginBuilder}

Set email. Used in Email flows.
Parameters:
Name Type Description
email String the email
Source:
Returns:
the same instance
Type
LoginBuilder

setEmailToken(email_token) → {LoginBuilder}

Set the email token. Used in EmailConfirmFlow
Parameters:
Name Type Description
email_token Object the email_token
Source:
Returns:
the same instance
Type
LoginBuilder

setErrorUrl(errorUrl) → {LoginBuilder}

Set error url.
Parameters:
Name Type Description
errorUrl String
Source:
Returns:
the same instance
Type
LoginBuilder

setExternalID(externalID) → {LoginBuilder}

Set external id. Used in external flow only.
Parameters:
Name Type Description
externalID String external user id
Source:
Returns:
the same instance
Type
LoginBuilder

setForgot(forgot_token) → {LoginBuilder}

Set the email forgot token. Used in EmailConfirmForgotFlow
Parameters:
Name Type Description
forgot_token Object the forgot_token
Source:
Returns:
the same instance
Type
LoginBuilder

setMSISDN(msisdn) → {LoginBuilder}

Set MSISDN. Used in MSISDNPINLoginFlow
Parameters:
Name Type Description
msisdn String
Source:
Returns:
the same instance
Type
LoginBuilder

setOAuthProvider(oauth) → {LoginBuilder}

Set oauth provider needed for OAuthLoginFlow
Parameters:
Name Type Description
oauth String provider
Source:
Returns:
the same instance
Type
LoginBuilder

setOnFlowCompleteCallback(callback) → {LoginBuilder}

Set callback invoked when a flow is ended
Parameters:
Name Type Description
callback FlowCompleteCallback Invoked at the end of the login flow
Source:
Returns:
the same instance
Type
LoginBuilder

setOnFlowCompleteCallback(callback) → {LoginBuilder}

Set callback invoked when a flow is ended
Parameters:
Name Type Description
callback FlowCompleteCallback Invoked at the end of the login flow
Source:
Returns:
the same instance
Type
LoginBuilder

setPassword(password) → {LoginBuilder}

Set the password. Used in Email flows.
Parameters:
Name Type Description
password String the password
Source:
Returns:
the same instance
Type
LoginBuilder

setPIN(pin) → {LoginBuilder}

Set PIN. Used in MSISDNPINLoginFlow
Parameters:
Name Type Description
pin String
Source:
Returns:
the same instance
Type
LoginBuilder

setReturnUrl(returnUrl) → {LoginBuilder}

Set return url.
Parameters:
Name Type Description
returnUrl String
Source:
Returns:
the same instance
Type
LoginBuilder

setSubscribeUrl(subscribeUrl) → {LoginBuilder}

Set subscribe url. Used in MSISDN flow only.
Parameters:
Name Type Description
subscribeUrl String the login url
Source:
Returns:
the same instance
Type
LoginBuilder

setUserProperties(user_properties) → {LoginBuilder}

Set the user properties if the EmailSignupFlow succeeded
Parameters:
Name Type Description
user_properties Object the user_properties
Source:
Returns:
the same instance
Type
LoginBuilder

setWaitingUrl(waitingUrl) → {LoginBuilder}

Set waiting url. Used in OAuthLoginFlow
Parameters:
Name Type Description
waitingUrl String
Source:
Returns:
the same instance
Type
LoginBuilder