AuthAPI Class
Constructor
AuthAPI
-
clientId -
[options={}]
Parameters:
-
clientIdString- the OAuth client ID for the relier
-
[options={}]Object optional- configuration
-
[contentHost]String optionalFirefox Accounts Content Server host
-
[oauthHost]String optionalFirefox Accounts OAuth Server host
-
[window]Object optionalwindow override, used for unit tests
-
[lightbox]Object optionallightbox override, used for unit tests
-
[channel]Object optionalchannel override, used for unit tests
Item Index
Methods
Methods
bestChoice
-
config -
[options.zIndex] -
[options.background]
Best choice auth strategy, has no action set. This strategy creates an oauth url to the "/oauth" endpoint on the content server. The oauth url has no action and the content server choose the auth flow.
Parameters:
-
configObject- configuration
-
stateStringCSRF/State token
-
redirectUriStringURI to redirect to when complete
-
scopeStringOAuth scope
-
[email]String optionalEmail address used to pre-fill into the account form, but the user is free to change it.
-
[ui]String optionalUI to present -
lightboxorredirect- defaults toredirect
-
[options.zIndex]Number optionalonly used when
config.ui=lightbox. The zIndex of the lightbox background. -
[options.background]String optionalonly used when
config.ui=lightbox. ThebackgroundCSS value
forceAuth
-
config -
[options.zIndex] -
[options.background]
Force a user to sign in as an existing user.
Parameters:
-
configObject- configuration
-
stateStringCSRF/State token
-
redirectUriStringURI to redirect to when complete
-
scopeStringOAuth scope
-
emailStringEmail address the user must sign in with. The user is unable to modify the email address and is unable to sign up if the address is not registered.
-
[ui]String optionalUI to present -
lightboxorredirect- defaults toredirect
-
[options.zIndex]Number optionalonly used when
config.ui=lightbox. The zIndex of the lightbox background. -
[options.background]String optionalonly used when
config.ui=lightbox. ThebackgroundCSS value
signIn
-
config -
[options.zIndex] -
[options.background]
Sign in an existing user.
Parameters:
-
configObject- configuration
-
stateStringCSRF/State token
-
redirectUriStringURI to redirect to when complete
-
scopeStringOAuth scope
-
[email]String optionalEmail address used to pre-fill into the account form, but the user is free to change it. Set to the string literal
blankto ignore any previously signed in email. Default is the last email address used to sign in. -
[ui]String optionalUI to present -
lightboxorredirect- defaults toredirect
-
[options.zIndex]Number optionalonly used when
config.ui=lightbox. The zIndex of the lightbox background. -
[options.background]String optionalonly used when
config.ui=lightbox. ThebackgroundCSS value
signUp
-
config -
[options.zIndex] -
[options.background]
Sign up a new user
Parameters:
-
configObject- configuration
-
stateStringCSRF/State token
-
redirectUriStringURI to redirect to when complete
-
scopeStringOAuth scope
-
[email]String optionalEmail address used to pre-fill into the account form, but the user is free to change it.
-
[ui]String optionalUI to present -
lightboxorredirect- defaults toredirect
-
[options.zIndex]Number optionalonly used when
config.ui=lightbox. The zIndex of the lightbox background. -
[options.background]String optionalonly used when
config.ui=lightbox. ThebackgroundCSS value
