@capgo/capacitor-social-login 8.7.0 → 8.7.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/plugin.js CHANGED
@@ -142,16 +142,6 @@ var capacitorCapacitorUpdater = (function (exports, core) {
142
142
  // ignore
143
143
  }
144
144
  }
145
- function hasOAuthRedirectParams() {
146
- const search = new URLSearchParams(window.location.search);
147
- const hash = new URLSearchParams(window.location.hash.replace(/^#/, ''));
148
- return (search.has('code') ||
149
- search.has('error') ||
150
- (search.has('hash') && search.has('auth_date')) ||
151
- hash.has('access_token') ||
152
- hash.has('id_token') ||
153
- hash.has('error'));
154
- }
155
145
  function isOAuthPopupContext() {
156
146
  if (typeof window === 'undefined')
157
147
  return false;
@@ -160,7 +150,8 @@ var capacitorCapacitorUpdater = (function (exports, core) {
160
150
  function shouldAutoFinishOAuthRedirect() {
161
151
  if (!localStorage.getItem(OAUTH_STATE_KEY))
162
152
  return false;
163
- return isOAuthPopupContext() || hasOAuthRedirectParams();
153
+ // Popup only. Same-window redirect (flow: 'redirect') must call handleRedirectCallback().
154
+ return isOAuthPopupContext();
164
155
  }
165
156
  /**
166
157
  * Deliver OAuth result from popup to opener via all available channels.