@sendoracloud/sdk-react-native 1.0.3 → 1.0.4
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 +8 -2
- package/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -684,10 +684,13 @@ var Auth = class {
|
|
|
684
684
|
* call `consumeSsoFragment(url)` on the captured URL.
|
|
685
685
|
*/
|
|
686
686
|
async startSso(returnTo) {
|
|
687
|
+
const prevAnonRefreshToken = this.readPrevAnonRefreshToken();
|
|
688
|
+
const body = { returnTo };
|
|
689
|
+
if (prevAnonRefreshToken) body.prevAnonRefreshToken = prevAnonRefreshToken;
|
|
687
690
|
const res = await post(
|
|
688
691
|
{ apiUrl: this.hooks.apiUrl, publicKey: this.hooks.publicKey, debug: this.hooks.debug },
|
|
689
692
|
"/api/v1/auth-service/sso/oidc/start",
|
|
690
|
-
|
|
693
|
+
body
|
|
691
694
|
);
|
|
692
695
|
if (!res || !res.ok) throw new AuthError("SSO_START_FAILED", `HTTP ${res?.status ?? "network"}`);
|
|
693
696
|
const parsed = await res.json();
|
|
@@ -707,10 +710,13 @@ var Auth = class {
|
|
|
707
710
|
* and SAML fragments transparently.
|
|
708
711
|
*/
|
|
709
712
|
async startSaml(returnTo) {
|
|
713
|
+
const prevAnonRefreshToken = this.readPrevAnonRefreshToken();
|
|
714
|
+
const body = { returnTo };
|
|
715
|
+
if (prevAnonRefreshToken) body.prevAnonRefreshToken = prevAnonRefreshToken;
|
|
710
716
|
const res = await post(
|
|
711
717
|
{ apiUrl: this.hooks.apiUrl, publicKey: this.hooks.publicKey, debug: this.hooks.debug },
|
|
712
718
|
"/api/v1/auth-service/sso/saml/start",
|
|
713
|
-
|
|
719
|
+
body
|
|
714
720
|
);
|
|
715
721
|
if (!res || !res.ok) throw new AuthError("SAML_START_FAILED", `HTTP ${res?.status ?? "network"}`);
|
|
716
722
|
const parsed = await res.json();
|
package/dist/index.js
CHANGED
|
@@ -641,10 +641,13 @@ var Auth = class {
|
|
|
641
641
|
* call `consumeSsoFragment(url)` on the captured URL.
|
|
642
642
|
*/
|
|
643
643
|
async startSso(returnTo) {
|
|
644
|
+
const prevAnonRefreshToken = this.readPrevAnonRefreshToken();
|
|
645
|
+
const body = { returnTo };
|
|
646
|
+
if (prevAnonRefreshToken) body.prevAnonRefreshToken = prevAnonRefreshToken;
|
|
644
647
|
const res = await post(
|
|
645
648
|
{ apiUrl: this.hooks.apiUrl, publicKey: this.hooks.publicKey, debug: this.hooks.debug },
|
|
646
649
|
"/api/v1/auth-service/sso/oidc/start",
|
|
647
|
-
|
|
650
|
+
body
|
|
648
651
|
);
|
|
649
652
|
if (!res || !res.ok) throw new AuthError("SSO_START_FAILED", `HTTP ${res?.status ?? "network"}`);
|
|
650
653
|
const parsed = await res.json();
|
|
@@ -664,10 +667,13 @@ var Auth = class {
|
|
|
664
667
|
* and SAML fragments transparently.
|
|
665
668
|
*/
|
|
666
669
|
async startSaml(returnTo) {
|
|
670
|
+
const prevAnonRefreshToken = this.readPrevAnonRefreshToken();
|
|
671
|
+
const body = { returnTo };
|
|
672
|
+
if (prevAnonRefreshToken) body.prevAnonRefreshToken = prevAnonRefreshToken;
|
|
667
673
|
const res = await post(
|
|
668
674
|
{ apiUrl: this.hooks.apiUrl, publicKey: this.hooks.publicKey, debug: this.hooks.debug },
|
|
669
675
|
"/api/v1/auth-service/sso/saml/start",
|
|
670
|
-
|
|
676
|
+
body
|
|
671
677
|
);
|
|
672
678
|
if (!res || !res.ok) throw new AuthError("SAML_START_FAILED", `HTTP ${res?.status ?? "network"}`);
|
|
673
679
|
const parsed = await res.json();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendoracloud/sdk-react-native",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
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",
|