New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aws-cognito-redux-saga-refact

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-cognito-redux-saga-refact - npm Package Compare versions

Comparing version

to
1.5.19

2

package.json
{
"name": "aws-cognito-redux-saga-refact",
"version": "1.5.18",
"version": "1.5.19",
"description": "Redux Saga AWS Cognito Library",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -6,2 +6,3 @@ export const AUTH_INIT = 'AUTH_INIT'

export const AUTH_SIGN_IN = 'AUTH_SIGN_IN'
export const AUTH_CONFIRMATION = 'AUTH_CONFIRMATION'
export const AUTH_SIGN_OUT = 'AUTH_SIGN_OUT'

@@ -8,0 +9,0 @@ export const AUTH_FORGOT_PASSWORD = 'AUTH_FORGOT_PASSWORD'

@@ -28,2 +28,12 @@ import * as action from './actions'

export const confirmation = (username, code) => {
return {
type: action.AUTH_CONFIRMATION,
payload: {
username,
code
}
}
}
export const signIn = (username, password, code) => {

@@ -30,0 +40,0 @@ return {

@@ -89,2 +89,22 @@ import * as auth from 'aws-cognito-promises-refact'

function* confirmation(action) {
try {
const { username, code } = action.payload
yield call(auth.confirmation, username, code)
yield put({
type: actions.AUTH_SET_STATE,
payload: {
isConfirmed: states.AUTH_SUCCESS,
}
})
} catch (e) {
yield put({
type: actions.AUTH_SET_STATE,
payload: { isConfirmed: states.AUTH_FAIL, error: e }
})
}
}
function* signIn(action) {

@@ -204,2 +224,3 @@ let user = null;

yield takeLatest(actions.AUTH_SIGN_UP, signUp)
yield takeLatest(actions.AUTH_CONFIRMATION, confirmation)
yield takeLatest(actions.AUTH_SIGN_IN, signIn)

@@ -206,0 +227,0 @@ yield takeLatest(actions.AUTH_SIGN_OUT, signOut)

Sorry, the diff of this file is too big to display