@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.cjs
CHANGED
|
@@ -120,7 +120,9 @@ var HttpClient = class {
|
|
|
120
120
|
"Content-Type": "application/json",
|
|
121
121
|
...this.config.headers
|
|
122
122
|
},
|
|
123
|
-
body:
|
|
123
|
+
body: JSON.stringify(
|
|
124
|
+
this.config.authMode === "jwt" ? { refreshToken, authMode: "jwt" } : { authMode: "cookie" }
|
|
125
|
+
),
|
|
124
126
|
credentials: this.config.credentials
|
|
125
127
|
}
|
|
126
128
|
);
|
|
@@ -721,7 +723,7 @@ var AuthModule = class {
|
|
|
721
723
|
const refreshToken = await this.storage.get(STORAGE_KEYS.REFRESH_TOKEN);
|
|
722
724
|
const response = await this.client.post(
|
|
723
725
|
"/auth/refresh",
|
|
724
|
-
this.authMode === "jwt" ? { refreshToken } :
|
|
726
|
+
this.authMode === "jwt" ? { refreshToken, authMode: "jwt" } : { authMode: "cookie" }
|
|
725
727
|
);
|
|
726
728
|
await this.storeTokens(response);
|
|
727
729
|
const tokens = {
|