@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 CHANGED
@@ -120,7 +120,9 @@ var HttpClient = class {
120
120
  "Content-Type": "application/json",
121
121
  ...this.config.headers
122
122
  },
123
- body: this.config.authMode === "jwt" ? JSON.stringify({ refreshToken }) : void 0,
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 } : void 0
726
+ this.authMode === "jwt" ? { refreshToken, authMode: "jwt" } : { authMode: "cookie" }
725
727
  );
726
728
  await this.storeTokens(response);
727
729
  const tokens = {