@sendoracloud/sdk-react-native 1.0.1 → 1.0.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/index.cjs CHANGED
@@ -434,11 +434,18 @@ var Auth = class {
434
434
  */
435
435
  loginSocial(input) {
436
436
  return this.serialize(async () => {
437
+ let prevAnonRefreshToken;
438
+ if (this.user?.isAnonymous) {
439
+ const stashed = this.hooks.storage.get(REFRESH_KEY);
440
+ if (stashed) prevAnonRefreshToken = stashed;
441
+ }
437
442
  if (this.user !== null) await this.wipeLocalIdentity();
443
+ const payload = { ...input };
444
+ if (prevAnonRefreshToken) payload.prevAnonRefreshToken = prevAnonRefreshToken;
438
445
  const res = await post(
439
446
  { apiUrl: this.hooks.apiUrl, publicKey: this.hooks.publicKey, debug: this.hooks.debug },
440
447
  "/api/v1/auth-service/login/social",
441
- input
448
+ payload
442
449
  );
443
450
  if (!res) throw new AuthError("NETWORK_ERROR", "Network request failed");
444
451
  let parsed;
package/dist/index.js CHANGED
@@ -391,11 +391,18 @@ var Auth = class {
391
391
  */
392
392
  loginSocial(input) {
393
393
  return this.serialize(async () => {
394
+ let prevAnonRefreshToken;
395
+ if (this.user?.isAnonymous) {
396
+ const stashed = this.hooks.storage.get(REFRESH_KEY);
397
+ if (stashed) prevAnonRefreshToken = stashed;
398
+ }
394
399
  if (this.user !== null) await this.wipeLocalIdentity();
400
+ const payload = { ...input };
401
+ if (prevAnonRefreshToken) payload.prevAnonRefreshToken = prevAnonRefreshToken;
395
402
  const res = await post(
396
403
  { apiUrl: this.hooks.apiUrl, publicKey: this.hooks.publicKey, debug: this.hooks.debug },
397
404
  "/api/v1/auth-service/login/social",
398
- input
405
+ payload
399
406
  );
400
407
  if (!res) throw new AuthError("NETWORK_ERROR", "Network request failed");
401
408
  let parsed;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendoracloud/sdk-react-native",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
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",