Home Manual Reference Source Test Repository

References

Class Summary

Static Public Class Summary
public

Container for logout behaviour.

Function Summary

Static Public Function Summary
public

authenticate(username: string, password: string, userPool: object): Promise<object>

Authenticates with a user pool, and handles responses.

public

buildLogins(username: string, jwtToken: string, config: object): *

builds the federated identity pool login structure

public

changePassword(user: object, oldPassword: string, newPassword: string)

Change a user's password

public

cognito(state: object, action: object): *

reducer function to be passed to redux combineReducers

public

createGuard(store: object, forbiddenUrl: string): function

creates a guard function you can use in <Route> tags

public

direct(state: object, dispatch: function)

transitions directly from AUTHENTICATED to LOGGING_IN

public

sends the email verification code and transitions to the correct state

public

requires email verification before transitioning from AUTHENTICATED

public

enable(store: object, f: function)

subscribes a "policy" function to the store, and calls it with the state and the dispatch function

public

fetchAttributes(state: object, dispatch: function)

fetches and stores attributes before transitioning from AUTHENTICATED

public

Fetches the user attributes from Cognito, and turns them into an object

public

identityPoolLogin(state: object, dispatch: function)

logs into the single federated identity pool to transition from LOGGING_IN to LOGGED_IN

public

mkAttrList(attributes: object): array

convert an attribute dictionary to an attribute list

public

establishes a session with the user pool, and logs into the federated identity pool using a token from the session

public

registerUser(userPool: object, config: object, username: string, password: string, attributes: object): Promise<object>

sign up this user with the user pool provided

public

Request that a verification code is sent by email or SMS to verify an attribute

public

setupCognito(store: *, config: *)

sets up react-cognito with default policies.

public

updateAttributes(user: object, attributes: object): Promise<object>

update the attributes in Cognito

Variable Summary

Static Public Variable Summary
public

Action: {"configure": *, "authenticated": *, "loggingIn": *, "login": *, "logout": *, "loginFailure": *, "mfaRequired": *, "newPasswordRequired": *, "newPasswordRequiredFailure": *, "emailVerificationRequired": *, "emailVerificationFailed": *, "beginPasswordResetFlow": *, "finishPasswordResetFlow": *, "updateAttributes": *, "confirmationRequired": *}

container for all the actions

public

CognitoState: {"LOGGED_OUT": string, "AUTHENTICATED": string, "LOGGING_IN": string, "LOGGED_IN": string, "NEW_PASSWORD_REQUIRED": string, "MFA_REQUIRED": string, "EMAIL_VERIFICATION_REQUIRED": string, "CONFIRMATION_REQUIRED": string}

states stored in store.cognito.state

public

Confirm: *

Container for a confirmation form.

public

Wrapper for an Email Verification Form.

public

Login: *

Container for login behaviour, wrapping a login form.

public

Wrapper for a New Password Required form

public

Container for a Password Reset form