Skip to content

Commit a68ec75

Browse files
author
Carlos
committed
signinuser return promise
1 parent 02410e7 commit a68ec75

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

dist/actions.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/actions.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/actions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ const generateAuthActions = (config: { [key: string]: any }): ActionsExport => {
188188
// allow any params in userSignInCredentials in addition to email and password
189189
const signInUser = (
190190
userSignInCredentials: any,
191-
) => async function (dispatch: Dispatch<{}>): Promise<void> {
191+
) => async function (dispatch: Dispatch<{}>): Promise<any> {
192192
dispatch(signInRequestSent())
193193
try {
194194
const response = await axios({
@@ -200,6 +200,7 @@ const generateAuthActions = (config: { [key: string]: any }): ActionsExport => {
200200
persistAuthHeadersInDeviceStorage(Storage, response.headers)
201201
const userAttributesToSave = getUserAttributesFromResponse(userAttributes, response)
202202
dispatch(signInRequestSucceeded(userAttributesToSave))
203+
return response
203204
} catch (error) {
204205
dispatch(signInRequestFailed())
205206
throw error

0 commit comments

Comments
 (0)