From 24c6fd1d780b87aa3bea5f1cb23e3343fb74466d Mon Sep 17 00:00:00 2001 From: sugarskull Date: Mon, 6 Aug 2018 14:27:35 -0700 Subject: [PATCH] Make sure persistAuthHeadersInDeviceStorage does not squash stored access token when none is returned - i.e. before its been used (devise) --- dist/AsyncLocalStorage.js.map | 2 +- dist/actions.js | 6 +++--- dist/actions.js.map | 2 +- dist/generate-require-signin-wrapper.js.map | 2 +- dist/reducers/current-user/index.js.map | 2 +- dist/services/auth.js | 23 ++++++++++++++++++--- dist/services/auth.js.map | 2 +- dist/services/utility.js.map | 2 +- src/actions.ts | 9 +++----- src/services/auth.ts | 20 +++++++++++------- 10 files changed, 45 insertions(+), 25 deletions(-) diff --git a/dist/AsyncLocalStorage.js.map b/dist/AsyncLocalStorage.js.map index 85374e81..d881bb1d 100644 --- a/dist/AsyncLocalStorage.js.map +++ b/dist/AsyncLocalStorage.js.map @@ -1 +1 @@ -{"version":3,"file":"AsyncLocalStorage.js","sourceRoot":"","sources":["../src/AsyncLocalStorage.ts"],"names":[],"mappings":";;AAAA,IAAM,iBAAiB,GAAG;IACxB,OAAO,EAAE,UAAC,GAAW,IAAmB,OAAA,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;QAClE,IAAI;YACF,IAAM,KAAK,GAAkB,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;YAC7D,OAAO,CAAC,KAAK,CAAC,CAAA;SACf;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,CAAC,KAAK,CAAC,CAAA;SACd;IACH,CAAC,CAAC,EAPsC,CAOtC;IAEF,OAAO,EAAE,UAAC,GAAW,EAAE,KAAa,IAAK,OAAA,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;QACnE,IAAI;YACF,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;YACvC,OAAO,CAAC,KAAK,CAAC,CAAA;SACf;QAAC,OAAO,KAAK,E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AAC,gBAAgB,CAAC,CAAA;QAC3B,CAAC;QAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,CAAA;QACf,CAAC;IACH,CAAC,CAAC,EARuC,CAQvC;CACH,CAAA;AAED,kBAAe,iBAAiB,CAAA"} \ No newline at end of file diff --git a/dist/actions.js b/dist/actions.js index 90029ca5..f06dc90a 100644 --- a/dist/actions.js +++ b/dist/actions.js @@ -127,7 +127,7 @@ var generateAuthActions = function (config) { })]; case 2: response = _a.sent(); - auth_1.setAuthHeaders(response.headers); + auth_1.setAuthHeaders(Storage, response.headers); auth_1.persistAuthHeadersInDeviceStorage(Storage, response.headers); userAttributesToSave = auth_1.getUserAttributesFromResponse(userAttributes, response); dispatch(exports.registrationRequestSucceeded(userAttributesToSave)); @@ -158,7 +158,7 @@ var generateAuthActions = function (config) { })]; case 2: response = _a.sent(); - auth_1.setAuthHeaders(response.headers); + auth_1.setAuthHeaders(Storage, response.headers); auth_1.persistAuthHeadersInDeviceStorage(Storage, response.headers); userAttributesToSave = auth_1.getUserAttributesFromResponse(userAttributes, response); dispatch(exports.verifyTokenRequestSucceeded(userAttributesToSave)); @@ -193,7 +193,7 @@ var generateAuthActions = function (config) { })]; case 2: response = _a.sent(); - auth_1.setAuthHeaders(response.headers); + auth_1.setAuthHeaders(Storage, response.headers); auth_1.persistAuthHeadersInDeviceStorage(Storage, response.headers); userAttributesToSave = auth_1.getUserAttributesFromResponse(userAttributes, response); dispatch(exports.signInRequestSucceeded(userAttributesToSave)); diff --git a/dist/actions.js.map b/dist/actions.js.map index c0b140d8..b8cb7b01 100644 --- a/dist/actions.js.map +++ b/dist/actions.js.map @@ -1 +1 @@ -{"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAmQA;;AAnQA,+BAAyB;AAKzB,iCAmCgB;AAChB,yDAAmD;A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,EAAE,CAAC,CAAA;;;;wBAEnC,QAAQ,CAAC,4BAAoB,EAAE,CAAC,CAAA;wBAChC,MAAM,OAAK,CAAA;;;;;KAEd,EApByB,CAoBzB,CAAA;IAED,IAAM,iBAAiB,GAAG,UAAO,KAAgB;;;;wBAC3C,qBAAM,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,EAAA;;yBAArC,SAAqC,EAArC,wBAAqC;;oBAErC,KAAA,cAAc,CAAA;oBAAE,qBAAM,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,EAAA;;oBAArD,MAAc,IAAE,SAA+C,CAAA;oBACvD,qBAAM,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAA;;oBAAvC,SAAM,IAAE,SAAyC,CAAA;oBAC5C,qBAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAA;;oBAH7B,kBAAkB,IAGtB,MAAG,IAAE,SAAsC,CAAA;2BAC5C;oBACD,KAAK,CAAC,QAAQ,CAAM,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAA;;;oBAEpD,KAAK,CAAC,QAAQ,CAAC,uCAA+B,CAAC,IAAI,CAAC,CAAC,CAAA;;;;;SAExD,CAAA;IAED,MAAM,CAAC;QACL,YAAY,cAAA;QACZ,WAAW,aAAA;QACX,UAAU,YAAA;QACV,WAAW,aAAA;QACX,iBAAiB,mBAAA;KAClB,CAAA;AACH,CAAC,CAAA;AACD,kBAAe,mBAAmB,CAAA"} \ No newline at end of file diff --git a/dist/generate-require-signin-wrapper.js.map b/dist/generate-require-signin-wrapper.js.map index c941866a..5fbf35f9 100644 --- a/dist/generate-require-signin-wrapper.js.map +++ b/dist/generate-require-signin-wrapper.js.map @@ -1 +1 @@ -{"version":3,"file":"generate-require-signin-wrapper.js","sourceRoot":"","sources":["../src/generate-require-signin-wrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,6BAA8B;AAE9B,2CAAqC;AAOrC,IAAM,4BAA4B,GAAG,UACnC,EAAiE;QAA/D,wDAAyB;IAE3B,IAAM,oBAAoB,GAAG,UAAC,aAA6B;QASzD;YAAwB,6BAA6B;YAArD;;YAuBA,CAAC;YAtBQ,6CAAyB,GAAhC,UAAiC,SAAuB;gBAEpD,IAAA,2BAAO,EACP,qEAA4B,EAC5B,iCAAU,CACC;gBACb,IAAI,4BAA4B,IAAI,CAAC,UAAU,EAAE;oBAC/C,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAA;iBAC3C;YACH,CAAC;YAEM,0BAAM,GAAb;gBACQ,IAAA,eAGQ,EAFZ,8DAA4B,EAC5B,0BAAU,CACE;gBAEd,OAAO,CAAC,4BAA4B,IAAI,UAAU,CAAC,CAAC,CAAC;oBACnD,oBAAC,aAAa,eAAK,IAAI,CAAC,KAAK,EAAI;oBACjC,CAAC;wBACD,gCAAW,CAAC;YAChB,CAAC;YACH,gBAAC;QAAD,CAAC,AAvBD,CAAwB,KAAK,CAAC,SAAS,GAuBtC;QAED,IAAM,eAAe,GAAG,UAAC,KAAiB,IAAK,OAAA,CAAC;YAC9C,4BAA4B,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,4BAA4B;YAC3F,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,UAAU;SACxD,CAAC,EAH6C,CAG7C,CAAA;QAEF,OAAO,qBAAO,CACZ,eAAe,CAChB,CAAC,SAAS,CAAC,CAAA;IACd,CAAC,CAAA;IAED,OAAO,oBAAoB,CAAA;AAC7B,CAAC,CAAA;AAED,kBAAe,4BAA4B,CAAA"} \ No newline at end of file +{"version":3,"file":"generate-require-signin-wrapper.js","sourceRoot":"","sources":["../src/generate-require-signin-wrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,6BAA8B;AAE9B,2CAAqC;AAOrC,IAAM,4BAA4B,GAAG,UACnC,EAAiE;QAA/D,wDAAyB;IAE3B,IAAM,oBAAoB,GAAG,UAAC,aAA6B;QASzD;YAAwB,6BAA6B;YAArD;;YAuBA,CAAC;YAtBQ,6CAAyB,GAAhC,UAAiC,SAAuB;gBAEpD,IAAA,2BAAO,EACP,qEAA4B,EAC5B,iCAAU,CACC;gBACb,EAAE,CAAC,CAAC,4BAA4B,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;oBAChD,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAA;gBAC5C,CAAC;YACH,CAAC;YAEM,0BAAM,GAAb;gBACQ,IAAA,eAGQ,EAFZ,8DAA4B,EAC5B,0BAAU,CACE;gBAEd,MAAM,CAAC,CAAC,4BAA4B,IAAI,UAAU,CAAC;oBACjD,oBAAC,aAAa,eAAK,IAAI,CAAC,KAAK,EAAI;;wBAEjC,gCAAW,CAAC;YAChB,CAAC;YACH,gBAAC;QAAD,CAAC,AAvBD,CAAwB,KAAK,CAAC,SAAS,GAuBtC;QAED,IAAM,eAAe,GAAG,UAAC,KAAiB,IAAK,OAAA,CAAC;YAC9C,4BAA4B,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,4BAA4B;YAC3F,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,UAAU;SACxD,CAAC,EAH6C,CAG7C,CAAA;QAEF,MAAM,CAAC,qBAAO,CACZ,eAAe,CAChB,CAAC,SAAS,CAAC,CAAA;IACd,CAAC,CAAA;IAED,MAAM,CAAC,oBAAoB,CAAA;AAC7B,CAAC,CAAA;AAED,kBAAe,4BAA4B,CAAA"} \ No newline at end of file diff --git a/dist/reducers/current-user/index.js.map b/dist/reducers/current-user/index.js.map index c2579f39..a06116b4 100644 --- a/dist/reducers/current-user/index.js.map +++ b/dist/reducers/current-user/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/reducers/current-user/index.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qCAiBoB;AACpB,qDAA8C;AAG5C,IAAA,iDAAwB,CACV;AAEhB,IAAM,WAAW,GAAG,UA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,KAAK,IACjB;QACH,KAAK,2CAAmC;YACtC,oBACK,KAAK,IACR,4BAA4B,EAAE,MAAM,CAAC,OAAO,CAAC,4BAA4B,IAC1E;QACH;YACE,OAAO,KAAK,CAAA;KACf;AACH,CAAC,CAAA;AAED,kBAAe,WAAW,CAAA"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/reducers/current-user/index.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qCAiBoB;AACpB,qDAA8C;AAG5C,IAAA,iDAAwB,CACV;AAEhB,IAAM,WAAW,GAAG,UAAC,KAAyB,EAAE,MAAmB;IAA9C,sBAAA,EAAA,mBAAyB;IAC5C,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QACpB,KAAK,iCAAyB,CAAC;QAC/B,KAAK,iCAAyB,CAAC;QAC/B,KAAK,2BAAmB,CAAC;QACzB,KAAK,4BAAoB;YACvB,MAAM,cACD,KAAK,IACR,SAAS,EAAE,IAAI,IAChB;QACH,KAAK,sCAA8B;YACjC,MAAM,cACD,KAAK,IACR,UAAU,eAAO,MAAM,CAAC,OAAO,CAAC,cAAc,GAC9C,SAAS,EAAE,KAAK,EAChB,UAAU,EAAE,IAAI,EAChB,4BAA4B,EAAE,IAAI,IACnC;QACH,KAAK,sCAA8B,CAAC;QACpC,KAAK,gCAAwB;YAC3B,MAAM,cACD,KAAK,IACR,UAAU,eAAO,MAAM,CAAC,OAAO,CAAC,cAAc,GAC9C,SAAS,EAAE,KAAK,EAChB,UAAU,EAAE,IAAI,IACjB;QACH,KAAK,mCAA2B;YAC9B,MAAM,cACD,KAAK,IACR,SAAS,EAAE,KAAK,EAChB,UAAU,EAAE,KAAK,EACjB,4BAA4B,EAAE,IAAI,IACnC;QACH,KAAK,mCAA2B,CAAC;QACjC,KAAK,6BAAqB;YACxB,MAAM,cACD,KAAK,IACR,SAAS,EAAE,KAAK,EAChB,UAAU,EAAE,KAAK,IAClB;QACH,KAAK,iCAAyB;YAC5B,IAAM,iBAAiB,GAAa,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;YACjE,IAAM,qBAAqB,GAAmB,iBAAiB,CAAC,MAAM,CACpE,UAAC,6BAA6C,EAAE,uBAA+B;gBAC7E,MAAM,cACD,6BAA6B,eAC/B,uBAAuB,IAAG,IAAI,OAChC;;YACH,CAAC,EACD,EAAE,CACH,CAAA;YACD,MAAM,cACD,KAAK,IACR,UAAU,EAAE,qBAAqB,EACjC,SAAS,EAAE,KAAK,EAChB,UAAU,EAAE,KAAK,IAClB;QACH,KAAK,8BAAsB;YACzB,MAAM,cACD,KAAK,IACR,SAAS,EAAE,KAAK,IACjB;QACH,KAAK,2CAAmC;YACtC,MAAM,cACD,KAAK,IACR,4BAA4B,EAAE,MAAM,CAAC,OAAO,CAAC,4BAA4B,IAC1E;QACH;YACE,MAAM,CAAC,KAAK,CAAA;IAChB,CAAC;AACH,CAAC,CAAA;AAED,kBAAe,WAAW,CAAA"} \ No newline at end of file diff --git a/dist/services/auth.js b/dist/services/auth.js index 41d9be40..3a4c9741 100644 --- a/dist/services/auth.js +++ b/dist/services/auth.js @@ -45,14 +45,31 @@ var authHeaderKeys = [ 'expiry', 'uid', ]; -exports.setAuthHeaders = function (headers) { +// export const setAuthHeaders = (headers: AuthHeaders): void => { +// authHeaderKeys.forEach((key: string) => { +// axios.defaults.headers.common[key] = headers[key] +// }) +// } +// +// export const persistAuthHeadersInDeviceStorage = (Storage: DeviceStorage, headers: AuthHeaders): void => { +// authHeaderKeys.forEach((key: string) => { +// Storage.setItem(key, headers[key]) +// }) +// } +exports.setAuthHeaders = function (Storage, headers) { authHeaderKeys.forEach(function (key) { - axios_1.default.defaults.headers.common[key] = headers[key]; + Storage.getItem(key).then(function (fromStorage) { + var value = headers[key] || fromStorage; + axios_1.default.defaults.headers.common[key] = value; + }); }); }; exports.persistAuthHeadersInDeviceStorage = function (Storage, headers) { authHeaderKeys.forEach(function (key) { - Storage.setItem(key, headers[key]); + Storage.getItem(key).then(function (fromStorage) { + var value = headers[key] || fromStorage; + Storage.setItem(key, value); // <--- Not really needed + }); }); }; exports.deleteAuthHeaders = function () { diff --git a/dist/services/auth.js.map b/dist/services/auth.js.map index 9605b6db..c9ebf6bf 100644 --- a/dist/services/auth.js.map +++ b/dist/services/auth.js.map @@ -1 +1 @@ -{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/services/auth.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAuDA;;AAvDA,+BAAyB;AACzB,qCAAkD;AAQlD,IAAM,cAAc,GAAkB;IACpC,cAAc;IACd,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,KAAK;CACN,CAAA;AAEY,QAAA,cAAc,GAAG,UAAC,OAAoB;IACjD,cAAc,CAAC,OAAO,CAAC,UAAC,GAAW;QACjC,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IACnD,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAEY,QAAA,iCAAiC,GAAG,UAAC,OAAsB,EAAE,OAAoB;IAC5F,cAAc,CAAC,OAAO,CAAC,UAAC,GAAW;QACjC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAEY,QAAA,iBAAiB,GAAG;IAC/B,cAAc,CAAC,OAAO,CAAC,UAAC,GAAW;QACjC,OAAO,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAC3C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAEY,QAAA,kCAAkC,GAAG,UAAO,OAAsB;;QAC7E,cAAc,CAAC,OAAO,CAAC,UAAC,GAAW;YACjC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC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OAAO,CAAC,UAAC,GAAW;QAClD,EAAE,CAAC,CAAC,yBAAyB,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAClD,sBAAsB,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAC/E,CAAC;IACH,CAAC,CAAC,CAAA;IACF,MAAM,CAAC,sBAAsB,CAAA;AAC/B,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/services/utility.js.map b/dist/services/utility.js.map index 3197eb37..1f3aaeb6 100644 --- a/dist/services/utility.js.map +++ b/dist/services/utility.js.map @@ -1 +1 @@ -{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/services/utility.ts"],"names":[],"mappings":";;AAEa,QAAA,sBAAsB,GAAG,UAAC,SAA+B;IACpE,IAAM,YAAY,GAAyB,EAAE,CAAA;IAC7C,KAAK,IAAI,GAAG,IAAI,SAAS,EAAE;QACzB,IAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,CAAA;QAC1B,YAAY,CAAC,GAAG,CAAC,GAAG,GAAG,CAAA;KACxB;IACD,OAAO,YAAY,CAAA;AACrB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/services/utility.ts"],"names":[],"mappings":";;AAEa,QAAA,sBAAsB,GAAG,UAAC,SAA+B;IACpE,IAAM,YAAY,GAAyB,EAAE,CAAA;IAC7C,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC;QAC1B,IAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,CAAA;QAC1B,YAAY,CAAC,GAAG,CAAC,GAAG,GAAG,CAAA;IACzB,CAAC;IACD,MAAM,CAAC,YAAY,CAAA;AACrB,CAAC,CAAA"} \ No newline at end of file diff --git a/src/actions.ts b/src/actions.ts index b19b084c..4ff8cbe8 100644 --- a/src/actions.ts +++ b/src/actions.ts @@ -51,7 +51,6 @@ import { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Pure Redux actions: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - export const registrationRequestSent = (): RegistrationRequestSentAction => ({ type: REGISTRATION_REQUEST_SENT, }) @@ -121,7 +120,6 @@ export const setHasVerificationBeenAttempted = ( //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Async Redux Thunk actions: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - const generateAuthActions = (config: { [key: string]: any }): ActionsExport => { const { authUrl, @@ -156,7 +154,7 @@ const generateAuthActions = (config: { [key: string]: any }): ActionsExport => { url: authUrl, data, }) - setAuthHeaders(response.headers) + setAuthHeaders(Storage, response.headers) persistAuthHeadersInDeviceStorage(Storage, response.headers) const userAttributesToSave = getUserAttributesFromResponse(userAttributes, response) dispatch(registrationRequestSucceeded(userAttributesToSave)) @@ -176,7 +174,7 @@ const generateAuthActions = (config: { [key: string]: any }): ActionsExport => { url: `${authUrl}/validate_token`, params: verificationParams, }) - setAuthHeaders(response.headers) + setAuthHeaders(Storage, response.headers) persistAuthHeadersInDeviceStorage(Storage, response.headers) const userAttributesToSave = getUserAttributesFromResponse(userAttributes, response) dispatch(verifyTokenRequestSucceeded(userAttributesToSave)) @@ -202,7 +200,7 @@ const generateAuthActions = (config: { [key: string]: any }): ActionsExport => { password, }, }) - setAuthHeaders(response.headers) + setAuthHeaders(Storage, response.headers) persistAuthHeadersInDeviceStorage(Storage, response.headers) const userAttributesToSave = getUserAttributesFromResponse(userAttributes, response) dispatch(signInRequestSucceeded(userAttributesToSave)) @@ -255,5 +253,4 @@ const generateAuthActions = (config: { [key: string]: any }): ActionsExport => { verifyCredentials, } } - export default generateAuthActions diff --git a/src/services/auth.ts b/src/services/auth.ts index 1ad32e5f..051d333e 100644 --- a/src/services/auth.ts +++ b/src/services/auth.ts @@ -15,17 +15,23 @@ const authHeaderKeys: Array = [ 'uid', ] -export const setAuthHeaders = (headers: AuthHeaders): void => { +export const setAuthHeaders = (Storage: DeviceStorage, headers: AuthHeaders): void => { authHeaderKeys.forEach((key: string) => { - axios.defaults.headers.common[key] = headers[key] - }) -} + Storage.getItem(key).then((fromStorage: string) => { + const value = headers[key] || fromStorage; + axios.defaults.headers.common[key] = value; + }); + }); +}; export const persistAuthHeadersInDeviceStorage = (Storage: DeviceStorage, headers: AuthHeaders): void => { authHeaderKeys.forEach((key: string) => { - Storage.setItem(key, headers[key]) - }) -} + Storage.getItem(key).then((fromStorage: string) => { + const value = headers[key] || fromStorage; + Storage.setItem(key, value); // <--- Not really needed + }); + }); +}; export const deleteAuthHeaders = (): void => { authHeaderKeys.forEach((key: string) => {