0.9.0 • Published 7 years ago

redux-modules-aws-cognito v0.9.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

redux-modules-aws-cognito

Generated with nod NPM version Build Status Coverage Status

AWS Cognito for React apps using redux and redux-saga.

Install

$ npm install --save redux-modules-aws-cognito

Usage

import myModule from 'redux-modules-aws-cognito'

myModule()

API

lastAuthUserAccessToken

LAST AUTH USER TOKENS

userSession

USER SESSION

userSessionAccessToken

USER SESSION TOKENS

userAccessToken

DEFAULT SESSION TOKENS

NOTE setting this up to return userSession tokens if available and then return lastAuthUser tokens if not.

NOTE for now I am using what is in storage pool until I understand how to properly use tokens in different scenarios (loading session from local storage & logging in)

State

Action Payloads

Type: {info: {user: {}?, signInUserSession: {idToken: {jwtToken: string}?, refreshToken: {token: string}?, accessToken: {jwtToken: string}?}?}, error: {message: string?}, hasSignedUp: boolean, isAuthenticating: boolean, isConfirmed: boolean, isAuthenticated: boolean, needConfirmCode: boolean, needMFA: boolean, needNewPassword: boolean}

Properties

  • info {user: {}?, signInUserSession: {idToken: {jwtToken: string}?, refreshToken: {token: string}?, accessToken: {jwtToken: string}?}?}
  • info.user {}?
  • info.signInUserSession {idToken: {jwtToken: string}?, refreshToken: {token: string}?, accessToken: {jwtToken: string}?}?
  • info.signInUserSession.idToken {jwtToken: string}?
  • info.signInUserSession.idToken.jwtToken string
  • info.signInUserSession.refreshToken {token: string}?
  • info.signInUserSession.refreshToken.token string
  • info.signInUserSession.accessToken {jwtToken: string}?
  • info.signInUserSession.accessToken.jwtToken string
  • error {message: string?}
  • error.message string?
  • hasSignedUp boolean
  • isAuthenticating boolean
  • isConfirmed boolean
  • isAuthenticated boolean
  • needConfirmCode boolean
  • needMFA boolean
  • needNewPassword boolean

PayloadLogIn

Action Payloads

Type: {email: string, password: string, code: string?, newPassword: string?}

Properties

ActionLoadSession

Action Types

Type: {type: "@@awsCognito/LOAD_SESSION"}

Properties

  • type "@@awsCognito/LOAD_SESSION"

Action

Action Union Type

Type: (ActionLoadSession | ActionLoadSessionFailed | ActionLoadSessionSuccess | ActionLogIn | ActionLogInFailed | ActionLogInSuccess | ActionLogInRequireMFA | ActionLogInRequireNewPassword | ActionLogOut | ActionLogOutFailed | ActionLogOutSuccess | ActionResetState | ActionSetState | ActionSignUp | ActionSignUpFailed | ActionSignUpSuccess)

License

MIT © OMT Tech

0.9.0

7 years ago

0.8.0

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.6.1

7 years ago

0.6.0

7 years ago

0.5.0

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago