Class: Redirect

Redirect

This class cannot be instantiated directly. Instead, use WebAuth.redirect

Methods

loginWithCredentials(options, cb)

Logs in the user with username and password using the cross origin authentication (/co/authenticate) flow. You can use either username or email to identify the user, but username will take precedence over email. Some browsers might not be able to successfully authenticate if 3rd party cookies are disabled in your browser. See here for more information.. After the /co/authenticate call, you'll have to use the parseHash function at the redirectUri specified in the constructor.

Parameters:
Name Type Description
options Object

options used in the authorize call after the login_ticket is acquired

Properties
Name Type Attributes Description
username String <optional>

Username (mutually exclusive with email)

email String <optional>

Email (mutually exclusive with username)

password String

Password

connection String <optional>

Connection used to authenticate the user, it can be a realm name or a database connection name

cb crossOriginLoginCallback

Callback function called only when an authentication error, like invalid username or password, occurs. For other types of errors, there will be a redirect to the redirectUri.

Deprecated:
  • This method will be released in the next major version. Use `webAuth.login` instead.
Source:

signupAndLogin(options, cb)

Signs up a new user and automatically logs the user in after the signup.

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Description
email String

user email address

password String

user password

connection String

name of the connection where the user will be created

captcha String <optional>

the attempted solution for the captcha, if one was presented

cb crossOriginLoginCallback
Source: