@progalaxyelabs/ngx-stonescriptphp-client 1.24.0 → 1.24.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.
@@ -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, platform: this.config.platformCode })
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
- platform: this.config.platformCode
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}?platform=${this.config.platformCode}&mode=popup`;
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, platform: this.config.platformCode })
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
- platform: this.config.platformCode
661
+ platform_code: this.config.platformCode
662
662
  })
663
663
  });
664
664
  const data = await response.json();
@@ -845,7 +845,7 @@ class ProgalaxyElabsAuth {
845
845
  headers: { 'Content-Type': 'application/json' },
846
846
  body: JSON.stringify({
847
847
  verified_token: verifiedToken,
848
- platform: this.config.platformCode
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
- platform: this.config.platformCode
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}?platform=${this.config.platformCode}&mode=popup`;
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.' });