@oxyhq/core 2.1.0 → 2.1.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.
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.CrossDomainAuth = void 0;
|
|
27
27
|
exports.createCrossDomainAuth = createCrossDomainAuth;
|
|
28
|
+
const loggerUtils_1 = require("./utils/loggerUtils");
|
|
28
29
|
class CrossDomainAuth {
|
|
29
30
|
constructor(oxyServices) {
|
|
30
31
|
this.oxyServices = oxyServices;
|
|
@@ -98,7 +99,7 @@ class CrossDomainAuth {
|
|
|
98
99
|
return session;
|
|
99
100
|
}
|
|
100
101
|
catch (error) {
|
|
101
|
-
|
|
102
|
+
loggerUtils_1.logger.warn('FedCM failed, trying popup', { component: 'CrossDomainAuth', method: 'autoSignIn' }, error);
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
// 2. Try popup (good UX, widely supported)
|
|
@@ -107,7 +108,7 @@ class CrossDomainAuth {
|
|
|
107
108
|
return await this.signInWithPopup(options);
|
|
108
109
|
}
|
|
109
110
|
catch (error) {
|
|
110
|
-
|
|
111
|
+
loggerUtils_1.logger.warn('Popup failed, falling back to redirect', { component: 'CrossDomainAuth', method: 'autoSignIn' }, error);
|
|
111
112
|
// Popup path failed — close the pre-opened popup before redirecting.
|
|
112
113
|
this.closeOrphanPopup(options.popup);
|
|
113
114
|
}
|
|
@@ -176,7 +177,7 @@ class CrossDomainAuth {
|
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
179
|
catch (error) {
|
|
179
|
-
|
|
180
|
+
loggerUtils_1.logger.debug('FedCM silent sign-in did not resolve', { component: 'CrossDomainAuth', method: 'silentSignIn' }, error);
|
|
180
181
|
}
|
|
181
182
|
}
|
|
182
183
|
// Fallback to iframe-based silent auth
|
|
@@ -184,7 +185,7 @@ class CrossDomainAuth {
|
|
|
184
185
|
return await this.oxyServices.silentSignIn();
|
|
185
186
|
}
|
|
186
187
|
catch (error) {
|
|
187
|
-
|
|
188
|
+
loggerUtils_1.logger.debug('iframe silent sign-in did not resolve', { component: 'CrossDomainAuth', method: 'silentSignIn' }, error);
|
|
188
189
|
return null;
|
|
189
190
|
}
|
|
190
191
|
}
|
|
@@ -269,7 +270,7 @@ class CrossDomainAuth {
|
|
|
269
270
|
}
|
|
270
271
|
}
|
|
271
272
|
catch (error) {
|
|
272
|
-
|
|
273
|
+
loggerUtils_1.logger.debug('stored session invalid', { component: 'CrossDomainAuth', method: 'initialize' }, error);
|
|
273
274
|
}
|
|
274
275
|
}
|
|
275
276
|
// 3. Try silent sign-in (check for SSO session at auth.oxy.so)
|