authera 2.2.2-test.1 → 2.2.2-test.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helper/axios.js +2 -8
- package/package.json +1 -1
package/dist/helper/axios.js
CHANGED
|
@@ -13,13 +13,8 @@ export default function createAxios(storage, settings) {
|
|
|
13
13
|
// Single-flight refresh across concurrent 401s
|
|
14
14
|
let refreshPromise = null;
|
|
15
15
|
const readAccessToken = () => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return token || null;
|
|
19
|
-
}
|
|
20
|
-
catch {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
16
|
+
const token = storage.get("access_token");
|
|
17
|
+
return token;
|
|
23
18
|
};
|
|
24
19
|
const readRefreshToken = () => {
|
|
25
20
|
try {
|
|
@@ -71,7 +66,6 @@ export default function createAxios(storage, settings) {
|
|
|
71
66
|
// Attach Authorization header on each request
|
|
72
67
|
instance.interceptors.request.use((config) => {
|
|
73
68
|
const access = readAccessToken();
|
|
74
|
-
console.log("access", access);
|
|
75
69
|
if (access) {
|
|
76
70
|
config.headers = {
|
|
77
71
|
...config.headers,
|