@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/README.md +10 -10
- package/android/src/main/java/ee/forgr/capacitor/social/login/OAuth2Provider.java +1 -1
- package/android/src/main/java/ee/forgr/capacitor/social/login/SocialLoginPlugin.java +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/definitions.d.ts +3 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/oauth-popup-bridge.js +2 -1
- package/dist/esm/oauth-popup-bridge.js.map +1 -1
- package/dist/plugin.cjs.js +2 -11
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +2 -11
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/SocialLoginPlugin/GoogleProvider.swift +6 -4
- package/ios/Sources/SocialLoginPlugin/SocialLoginPlugin.swift +1 -1
- package/package.json +1 -1
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
|
-
|
|
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.
|