@sendoracloud/sdk-react-native 1.0.0 → 1.0.1

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
@@ -392,11 +392,16 @@ var Auth = class {
392
392
  */
393
393
  signIn(email, password) {
394
394
  return this.serialize(async () => {
395
+ let prevAnonRefreshToken;
396
+ if (this.user?.isAnonymous) {
397
+ const stashed = this.hooks.storage.get(REFRESH_KEY);
398
+ if (stashed) prevAnonRefreshToken = stashed;
399
+ }
395
400
  if (this.user !== null) await this.wipeLocalIdentity();
396
401
  const res = await post(
397
402
  { apiUrl: this.hooks.apiUrl, publicKey: this.hooks.publicKey, debug: this.hooks.debug },
398
403
  "/api/v1/auth-service/login",
399
- { email, password }
404
+ prevAnonRefreshToken ? { email, password, prevAnonRefreshToken } : { email, password }
400
405
  );
401
406
  if (!res) throw new AuthError("NETWORK_ERROR", "Network request failed");
402
407
  let parsed;
package/dist/index.js CHANGED
@@ -349,11 +349,16 @@ var Auth = class {
349
349
  */
350
350
  signIn(email, password) {
351
351
  return this.serialize(async () => {
352
+ let prevAnonRefreshToken;
353
+ if (this.user?.isAnonymous) {
354
+ const stashed = this.hooks.storage.get(REFRESH_KEY);
355
+ if (stashed) prevAnonRefreshToken = stashed;
356
+ }
352
357
  if (this.user !== null) await this.wipeLocalIdentity();
353
358
  const res = await post(
354
359
  { apiUrl: this.hooks.apiUrl, publicKey: this.hooks.publicKey, debug: this.hooks.debug },
355
360
  "/api/v1/auth-service/login",
356
- { email, password }
361
+ prevAnonRefreshToken ? { email, password, prevAnonRefreshToken } : { email, password }
357
362
  );
358
363
  if (!res) throw new AuthError("NETWORK_ERROR", "Network request failed");
359
364
  let parsed;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendoracloud/sdk-react-native",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Sendora Cloud React Native + Expo SDK — analytics, identity, push-token registration, auth, deep links (Branch / Firebase Dynamic Links parity). Auth + analytics + deep links work in Expo Go; push token registration requires a Dev Client (EAS Build or `npx expo prebuild`).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",