@progalaxyelabs/ngx-stonescriptphp-client 1.24.0 → 1.24.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.
|
@@ -265,7 +265,7 @@ class StoneScriptPHPAuth {
|
|
|
265
265
|
method: 'POST',
|
|
266
266
|
headers: { 'Content-Type': 'application/json' },
|
|
267
267
|
credentials: 'include',
|
|
268
|
-
body: JSON.stringify({ email, password,
|
|
268
|
+
body: JSON.stringify({ email, password, platform_code: this.config.platformCode })
|
|
269
269
|
});
|
|
270
270
|
const data = await response.json();
|
|
271
271
|
if (this.isAuthSuccess(data)) {
|
|
@@ -294,7 +294,7 @@ class StoneScriptPHPAuth {
|
|
|
294
294
|
email,
|
|
295
295
|
password,
|
|
296
296
|
display_name: displayName,
|
|
297
|
-
|
|
297
|
+
platform_code: this.config.platformCode
|
|
298
298
|
})
|
|
299
299
|
});
|
|
300
300
|
const data = await response.json();
|
|
@@ -418,7 +418,7 @@ class StoneScriptPHPAuth {
|
|
|
418
418
|
const left = (window.screen.width - width) / 2;
|
|
419
419
|
const top = (window.screen.height - height) / 2;
|
|
420
420
|
const accountsUrl = this.getAccountsUrl();
|
|
421
|
-
const oauthUrl = `${accountsUrl}/oauth/${provider}?
|
|
421
|
+
const oauthUrl = `${accountsUrl}/oauth/${provider}?platform_code=${this.config.platformCode}&mode=popup`;
|
|
422
422
|
const popup = window.open(oauthUrl, `${provider}_login`, `width=${width},height=${height},left=${left},top=${top}`);
|
|
423
423
|
if (!popup) {
|
|
424
424
|
resolve({ success: false, message: 'Popup blocked. Please allow popups for this site.' });
|
|
@@ -637,7 +637,7 @@ class ProgalaxyElabsAuth {
|
|
|
637
637
|
const response = await fetch(`${this.host}/api/auth/login`, {
|
|
638
638
|
method: 'POST',
|
|
639
639
|
headers: { 'Content-Type': 'application/json' },
|
|
640
|
-
body: JSON.stringify({ email, password,
|
|
640
|
+
body: JSON.stringify({ email, password, platform_code: this.config.platformCode })
|
|
641
641
|
});
|
|
642
642
|
const data = await response.json();
|
|
643
643
|
if (!response.ok) {
|
|
@@ -658,7 +658,7 @@ class ProgalaxyElabsAuth {
|
|
|
658
658
|
email,
|
|
659
659
|
password,
|
|
660
660
|
display_name: displayName,
|
|
661
|
-
|
|
661
|
+
platform_code: this.config.platformCode
|
|
662
662
|
})
|
|
663
663
|
});
|
|
664
664
|
const data = await response.json();
|
|
@@ -787,7 +787,7 @@ class ProgalaxyElabsAuth {
|
|
|
787
787
|
const response = await fetch(`${this.host}/api/auth/otp/send`, {
|
|
788
788
|
method: 'POST',
|
|
789
789
|
headers: { 'Content-Type': 'application/json' },
|
|
790
|
-
body: JSON.stringify({ identifier })
|
|
790
|
+
body: JSON.stringify({ identifier, platform_code: this.config.platformCode })
|
|
791
791
|
});
|
|
792
792
|
const data = await response.json();
|
|
793
793
|
if (!response.ok) {
|
|
@@ -845,7 +845,7 @@ class ProgalaxyElabsAuth {
|
|
|
845
845
|
headers: { 'Content-Type': 'application/json' },
|
|
846
846
|
body: JSON.stringify({
|
|
847
847
|
verified_token: verifiedToken,
|
|
848
|
-
|
|
848
|
+
platform_code: this.config.platformCode
|
|
849
849
|
})
|
|
850
850
|
});
|
|
851
851
|
// 404 means no identity found — caller should show registration form
|
|
@@ -870,7 +870,7 @@ class ProgalaxyElabsAuth {
|
|
|
870
870
|
body: JSON.stringify({
|
|
871
871
|
verified_token: verifiedToken,
|
|
872
872
|
display_name: displayName,
|
|
873
|
-
|
|
873
|
+
platform_code: this.config.platformCode
|
|
874
874
|
})
|
|
875
875
|
});
|
|
876
876
|
const data = await response.json();
|
|
@@ -889,7 +889,7 @@ class ProgalaxyElabsAuth {
|
|
|
889
889
|
const width = 500, height = 600;
|
|
890
890
|
const left = (window.screen.width - width) / 2;
|
|
891
891
|
const top = (window.screen.height - height) / 2;
|
|
892
|
-
const oauthUrl = `${this.host}/oauth/${provider}?
|
|
892
|
+
const oauthUrl = `${this.host}/oauth/${provider}?platform_code=${this.config.platformCode}&mode=popup`;
|
|
893
893
|
const popup = window.open(oauthUrl, `${provider}_login`, `width=${width},height=${height},left=${left},top=${top}`);
|
|
894
894
|
if (!popup) {
|
|
895
895
|
resolve({ success: false, message: 'Popup blocked. Please allow popups for this site.' });
|