@baasix/sdk 0.1.5 → 0.1.6
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/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/modules/auth.cjs +1 -1
- package/dist/modules/auth.cjs.map +1 -1
- package/dist/modules/auth.js +1 -1
- package/dist/modules/auth.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -118,7 +118,9 @@ var HttpClient = class {
|
|
|
118
118
|
"Content-Type": "application/json",
|
|
119
119
|
...this.config.headers
|
|
120
120
|
},
|
|
121
|
-
body:
|
|
121
|
+
body: JSON.stringify(
|
|
122
|
+
this.config.authMode === "jwt" ? { refreshToken, authMode: "jwt" } : { authMode: "cookie" }
|
|
123
|
+
),
|
|
122
124
|
credentials: this.config.credentials
|
|
123
125
|
}
|
|
124
126
|
);
|
|
@@ -719,7 +721,7 @@ var AuthModule = class {
|
|
|
719
721
|
const refreshToken = await this.storage.get(STORAGE_KEYS.REFRESH_TOKEN);
|
|
720
722
|
const response = await this.client.post(
|
|
721
723
|
"/auth/refresh",
|
|
722
|
-
this.authMode === "jwt" ? { refreshToken } :
|
|
724
|
+
this.authMode === "jwt" ? { refreshToken, authMode: "jwt" } : { authMode: "cookie" }
|
|
723
725
|
);
|
|
724
726
|
await this.storeTokens(response);
|
|
725
727
|
const tokens = {
|