@sendoracloud/sdk-react-native 1.30.0 → 1.32.0
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 +16 -4
- package/dist/index.d.cts +39 -19
- package/dist/index.d.ts +39 -19
- package/dist/index.js +16 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -202,7 +202,7 @@ var Storage = class {
|
|
|
202
202
|
// package.json
|
|
203
203
|
var package_default = {
|
|
204
204
|
name: "@sendoracloud/sdk-react-native",
|
|
205
|
-
version: "1.
|
|
205
|
+
version: "1.32.0",
|
|
206
206
|
description: "Sendora Cloud React Native + Expo SDK \u2014 analytics, identity, push-token registration, auth (incl. Game Center / Play Games), deep links (Branch / Firebase Dynamic Links parity). Auth + analytics + deep links work in Expo Go; push-token registration and the no-arg Game Center / Play Games sign-in require a Dev Client (EAS Build or `npx expo prebuild`).",
|
|
207
207
|
type: "module",
|
|
208
208
|
main: "./dist/index.cjs",
|
|
@@ -697,9 +697,21 @@ var Auth = class {
|
|
|
697
697
|
* keyed by the anonymous id — your own users table, an analytics
|
|
698
698
|
* cache, an audience filter — without needing a webhook receiver.
|
|
699
699
|
*
|
|
700
|
-
*
|
|
701
|
-
* `
|
|
702
|
-
*
|
|
700
|
+
* Fires on EVERY identified sign-in path — `signIn`, `loginSocial`,
|
|
701
|
+
* `signInWithGameCenter`, `signInWithPlayGames`, `challengeMfa`,
|
|
702
|
+
* `verifyMagicLink`, `verifyEmailOtp`, passkey authentication, and SSO
|
|
703
|
+
* completion (`consumeSsoFragment`) — because it is fired centrally from
|
|
704
|
+
* `persist()` whenever the response carries `retiredAnonUserId`.
|
|
705
|
+
*
|
|
706
|
+
* ⚠ The two gaming paths are the ones that matter most here, and were
|
|
707
|
+
* missing from this list before 1.31.0. When the presented player identity
|
|
708
|
+
* already belongs to another account, the sign-in ADOPTS that account and
|
|
709
|
+
* the anonymous account on this device is retired — its row is DELETED
|
|
710
|
+
* server-side. This listener is the only client-side signal that happened;
|
|
711
|
+
* the call itself resolves successfully. If you would rather it not happen
|
|
712
|
+
* at all, pass `onCredentialInUse: "reject"`.
|
|
713
|
+
*
|
|
714
|
+
* Returns an unsubscribe function.
|
|
703
715
|
*
|
|
704
716
|
* Listeners are best-effort: errors thrown inside them are swallowed
|
|
705
717
|
* + logged in dev mode. Auth state never depends on listener success.
|
package/dist/index.d.cts
CHANGED
|
@@ -348,20 +348,27 @@ declare class CredentialInUseError extends Error {
|
|
|
348
348
|
}
|
|
349
349
|
/**
|
|
350
350
|
* What a sign-in should do when the credential you present already belongs to
|
|
351
|
-
* an account
|
|
351
|
+
* an account.
|
|
352
352
|
*
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
* "collision" is usually the SAME person's earlier account. If this device is
|
|
357
|
-
* anonymous, that anonymous account is retired — **its row is deleted** — and
|
|
358
|
-
* `onDeviceTakeover` fires with its id.
|
|
359
|
-
* - `"reject"`: throw `CredentialInUseError` and change nothing at all. Use it
|
|
360
|
-
* when the local anonymous session holds progress you are not willing to
|
|
361
|
-
* trade. Mirrors Firebase `linkWithCredential`
|
|
362
|
-
* (`auth/credential-already-in-use`) and Supabase `linkIdentity`.
|
|
353
|
+
* **You usually want the default — omit this.** Since 1.32.0 the default is
|
|
354
|
+
* safe by construction: adopt the other account silently when nothing would be
|
|
355
|
+
* destroyed, and refuse when something would be.
|
|
363
356
|
*
|
|
364
|
-
*
|
|
357
|
+
* - **Fresh install / no guest session** → nothing to lose, so it adopts. This
|
|
358
|
+
* is the reinstall-recovery path: a Game Center / Play Games identity
|
|
359
|
+
* survives a reinstall server-side, so the "collision" is usually the SAME
|
|
360
|
+
* person's earlier account, and they get it back. Never refused.
|
|
361
|
+
* - **Live guest session** → adopting would retire it (**its row is deleted**
|
|
362
|
+
* and `onDeviceTakeover` fires). Refused with `CredentialInUseError` so you
|
|
363
|
+
* can ask the player instead of the SDK guessing on their behalf.
|
|
364
|
+
*
|
|
365
|
+
* Override in either direction:
|
|
366
|
+
*
|
|
367
|
+
* - `"adopt"` — always adopt, even when it deletes the guest account. This is
|
|
368
|
+
* what every release before 1.30.0 did unconditionally.
|
|
369
|
+
* - `"reject"` — always throw on a collision, even a harmless one.
|
|
370
|
+
*
|
|
371
|
+
* ⚠ A refusal blocks the switch; it does not merge the two accounts. To offer
|
|
365
372
|
* "use my other account", catch the error and re-call with `"adopt"`, then
|
|
366
373
|
* migrate your own data from `onDeviceTakeover`'s `retiredAnonUserId`.
|
|
367
374
|
*/
|
|
@@ -377,7 +384,8 @@ type GameSignInOptions = {
|
|
|
377
384
|
link?: boolean;
|
|
378
385
|
/**
|
|
379
386
|
* What to do when the player identity already belongs to an account.
|
|
380
|
-
*
|
|
387
|
+
* **Omit it** — the default refuses only when a live guest session would be
|
|
388
|
+
* deleted. See {@link CredentialCollisionPolicy}.
|
|
381
389
|
*/
|
|
382
390
|
onCredentialInUse?: CredentialCollisionPolicy;
|
|
383
391
|
};
|
|
@@ -583,9 +591,21 @@ declare class Auth {
|
|
|
583
591
|
* keyed by the anonymous id — your own users table, an analytics
|
|
584
592
|
* cache, an audience filter — without needing a webhook receiver.
|
|
585
593
|
*
|
|
586
|
-
*
|
|
587
|
-
* `
|
|
588
|
-
*
|
|
594
|
+
* Fires on EVERY identified sign-in path — `signIn`, `loginSocial`,
|
|
595
|
+
* `signInWithGameCenter`, `signInWithPlayGames`, `challengeMfa`,
|
|
596
|
+
* `verifyMagicLink`, `verifyEmailOtp`, passkey authentication, and SSO
|
|
597
|
+
* completion (`consumeSsoFragment`) — because it is fired centrally from
|
|
598
|
+
* `persist()` whenever the response carries `retiredAnonUserId`.
|
|
599
|
+
*
|
|
600
|
+
* ⚠ The two gaming paths are the ones that matter most here, and were
|
|
601
|
+
* missing from this list before 1.31.0. When the presented player identity
|
|
602
|
+
* already belongs to another account, the sign-in ADOPTS that account and
|
|
603
|
+
* the anonymous account on this device is retired — its row is DELETED
|
|
604
|
+
* server-side. This listener is the only client-side signal that happened;
|
|
605
|
+
* the call itself resolves successfully. If you would rather it not happen
|
|
606
|
+
* at all, pass `onCredentialInUse: "reject"`.
|
|
607
|
+
*
|
|
608
|
+
* Returns an unsubscribe function.
|
|
589
609
|
*
|
|
590
610
|
* Listeners are best-effort: errors thrown inside them are swallowed
|
|
591
611
|
* + logged in dev mode. Auth state never depends on listener success.
|
|
@@ -754,9 +774,9 @@ declare class Auth {
|
|
|
754
774
|
link?: boolean;
|
|
755
775
|
/**
|
|
756
776
|
* What to do if this social identity (or its verified email) already
|
|
757
|
-
* belongs to an account.
|
|
758
|
-
*
|
|
759
|
-
*
|
|
777
|
+
* belongs to an account. **Omit it** — the default adopts when nothing
|
|
778
|
+
* would be destroyed and refuses when a live guest session would be
|
|
779
|
+
* deleted. See {@link CredentialCollisionPolicy}.
|
|
760
780
|
*/
|
|
761
781
|
onCredentialInUse?: CredentialCollisionPolicy;
|
|
762
782
|
}): Promise<AuthUser>;
|
package/dist/index.d.ts
CHANGED
|
@@ -348,20 +348,27 @@ declare class CredentialInUseError extends Error {
|
|
|
348
348
|
}
|
|
349
349
|
/**
|
|
350
350
|
* What a sign-in should do when the credential you present already belongs to
|
|
351
|
-
* an account
|
|
351
|
+
* an account.
|
|
352
352
|
*
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
* "collision" is usually the SAME person's earlier account. If this device is
|
|
357
|
-
* anonymous, that anonymous account is retired — **its row is deleted** — and
|
|
358
|
-
* `onDeviceTakeover` fires with its id.
|
|
359
|
-
* - `"reject"`: throw `CredentialInUseError` and change nothing at all. Use it
|
|
360
|
-
* when the local anonymous session holds progress you are not willing to
|
|
361
|
-
* trade. Mirrors Firebase `linkWithCredential`
|
|
362
|
-
* (`auth/credential-already-in-use`) and Supabase `linkIdentity`.
|
|
353
|
+
* **You usually want the default — omit this.** Since 1.32.0 the default is
|
|
354
|
+
* safe by construction: adopt the other account silently when nothing would be
|
|
355
|
+
* destroyed, and refuse when something would be.
|
|
363
356
|
*
|
|
364
|
-
*
|
|
357
|
+
* - **Fresh install / no guest session** → nothing to lose, so it adopts. This
|
|
358
|
+
* is the reinstall-recovery path: a Game Center / Play Games identity
|
|
359
|
+
* survives a reinstall server-side, so the "collision" is usually the SAME
|
|
360
|
+
* person's earlier account, and they get it back. Never refused.
|
|
361
|
+
* - **Live guest session** → adopting would retire it (**its row is deleted**
|
|
362
|
+
* and `onDeviceTakeover` fires). Refused with `CredentialInUseError` so you
|
|
363
|
+
* can ask the player instead of the SDK guessing on their behalf.
|
|
364
|
+
*
|
|
365
|
+
* Override in either direction:
|
|
366
|
+
*
|
|
367
|
+
* - `"adopt"` — always adopt, even when it deletes the guest account. This is
|
|
368
|
+
* what every release before 1.30.0 did unconditionally.
|
|
369
|
+
* - `"reject"` — always throw on a collision, even a harmless one.
|
|
370
|
+
*
|
|
371
|
+
* ⚠ A refusal blocks the switch; it does not merge the two accounts. To offer
|
|
365
372
|
* "use my other account", catch the error and re-call with `"adopt"`, then
|
|
366
373
|
* migrate your own data from `onDeviceTakeover`'s `retiredAnonUserId`.
|
|
367
374
|
*/
|
|
@@ -377,7 +384,8 @@ type GameSignInOptions = {
|
|
|
377
384
|
link?: boolean;
|
|
378
385
|
/**
|
|
379
386
|
* What to do when the player identity already belongs to an account.
|
|
380
|
-
*
|
|
387
|
+
* **Omit it** — the default refuses only when a live guest session would be
|
|
388
|
+
* deleted. See {@link CredentialCollisionPolicy}.
|
|
381
389
|
*/
|
|
382
390
|
onCredentialInUse?: CredentialCollisionPolicy;
|
|
383
391
|
};
|
|
@@ -583,9 +591,21 @@ declare class Auth {
|
|
|
583
591
|
* keyed by the anonymous id — your own users table, an analytics
|
|
584
592
|
* cache, an audience filter — without needing a webhook receiver.
|
|
585
593
|
*
|
|
586
|
-
*
|
|
587
|
-
* `
|
|
588
|
-
*
|
|
594
|
+
* Fires on EVERY identified sign-in path — `signIn`, `loginSocial`,
|
|
595
|
+
* `signInWithGameCenter`, `signInWithPlayGames`, `challengeMfa`,
|
|
596
|
+
* `verifyMagicLink`, `verifyEmailOtp`, passkey authentication, and SSO
|
|
597
|
+
* completion (`consumeSsoFragment`) — because it is fired centrally from
|
|
598
|
+
* `persist()` whenever the response carries `retiredAnonUserId`.
|
|
599
|
+
*
|
|
600
|
+
* ⚠ The two gaming paths are the ones that matter most here, and were
|
|
601
|
+
* missing from this list before 1.31.0. When the presented player identity
|
|
602
|
+
* already belongs to another account, the sign-in ADOPTS that account and
|
|
603
|
+
* the anonymous account on this device is retired — its row is DELETED
|
|
604
|
+
* server-side. This listener is the only client-side signal that happened;
|
|
605
|
+
* the call itself resolves successfully. If you would rather it not happen
|
|
606
|
+
* at all, pass `onCredentialInUse: "reject"`.
|
|
607
|
+
*
|
|
608
|
+
* Returns an unsubscribe function.
|
|
589
609
|
*
|
|
590
610
|
* Listeners are best-effort: errors thrown inside them are swallowed
|
|
591
611
|
* + logged in dev mode. Auth state never depends on listener success.
|
|
@@ -754,9 +774,9 @@ declare class Auth {
|
|
|
754
774
|
link?: boolean;
|
|
755
775
|
/**
|
|
756
776
|
* What to do if this social identity (or its verified email) already
|
|
757
|
-
* belongs to an account.
|
|
758
|
-
*
|
|
759
|
-
*
|
|
777
|
+
* belongs to an account. **Omit it** — the default adopts when nothing
|
|
778
|
+
* would be destroyed and refuses when a live guest session would be
|
|
779
|
+
* deleted. See {@link CredentialCollisionPolicy}.
|
|
760
780
|
*/
|
|
761
781
|
onCredentialInUse?: CredentialCollisionPolicy;
|
|
762
782
|
}): Promise<AuthUser>;
|
package/dist/index.js
CHANGED
|
@@ -157,7 +157,7 @@ var Storage = class {
|
|
|
157
157
|
// package.json
|
|
158
158
|
var package_default = {
|
|
159
159
|
name: "@sendoracloud/sdk-react-native",
|
|
160
|
-
version: "1.
|
|
160
|
+
version: "1.32.0",
|
|
161
161
|
description: "Sendora Cloud React Native + Expo SDK \u2014 analytics, identity, push-token registration, auth (incl. Game Center / Play Games), deep links (Branch / Firebase Dynamic Links parity). Auth + analytics + deep links work in Expo Go; push-token registration and the no-arg Game Center / Play Games sign-in require a Dev Client (EAS Build or `npx expo prebuild`).",
|
|
162
162
|
type: "module",
|
|
163
163
|
main: "./dist/index.cjs",
|
|
@@ -652,9 +652,21 @@ var Auth = class {
|
|
|
652
652
|
* keyed by the anonymous id — your own users table, an analytics
|
|
653
653
|
* cache, an audience filter — without needing a webhook receiver.
|
|
654
654
|
*
|
|
655
|
-
*
|
|
656
|
-
* `
|
|
657
|
-
*
|
|
655
|
+
* Fires on EVERY identified sign-in path — `signIn`, `loginSocial`,
|
|
656
|
+
* `signInWithGameCenter`, `signInWithPlayGames`, `challengeMfa`,
|
|
657
|
+
* `verifyMagicLink`, `verifyEmailOtp`, passkey authentication, and SSO
|
|
658
|
+
* completion (`consumeSsoFragment`) — because it is fired centrally from
|
|
659
|
+
* `persist()` whenever the response carries `retiredAnonUserId`.
|
|
660
|
+
*
|
|
661
|
+
* ⚠ The two gaming paths are the ones that matter most here, and were
|
|
662
|
+
* missing from this list before 1.31.0. When the presented player identity
|
|
663
|
+
* already belongs to another account, the sign-in ADOPTS that account and
|
|
664
|
+
* the anonymous account on this device is retired — its row is DELETED
|
|
665
|
+
* server-side. This listener is the only client-side signal that happened;
|
|
666
|
+
* the call itself resolves successfully. If you would rather it not happen
|
|
667
|
+
* at all, pass `onCredentialInUse: "reject"`.
|
|
668
|
+
*
|
|
669
|
+
* Returns an unsubscribe function.
|
|
658
670
|
*
|
|
659
671
|
* Listeners are best-effort: errors thrown inside them are swallowed
|
|
660
672
|
* + logged in dev mode. Auth state never depends on listener success.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendoracloud/sdk-react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"description": "Sendora Cloud React Native + Expo SDK — analytics, identity, push-token registration, auth (incl. Game Center / Play Games), deep links (Branch / Firebase Dynamic Links parity). Auth + analytics + deep links work in Expo Go; push-token registration and the no-arg Game Center / Play Games sign-in require a Dev Client (EAS Build or `npx expo prebuild`).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|