@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.
package/package.json
CHANGED
package/src/CrossDomainAuth.ts
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
import type { OxyServices } from './OxyServices';
|
|
26
26
|
import type { SessionLoginResponse } from './models/session';
|
|
27
|
+
import { logger } from './utils/loggerUtils';
|
|
27
28
|
|
|
28
29
|
export interface CrossDomainAuthOptions {
|
|
29
30
|
/**
|
|
@@ -143,7 +144,7 @@ export class CrossDomainAuth {
|
|
|
143
144
|
this.closeOrphanPopup(options.popup);
|
|
144
145
|
return session;
|
|
145
146
|
} catch (error) {
|
|
146
|
-
|
|
147
|
+
logger.warn('FedCM failed, trying popup', { component: 'CrossDomainAuth', method: 'autoSignIn' }, error);
|
|
147
148
|
}
|
|
148
149
|
}
|
|
149
150
|
|
|
@@ -152,7 +153,7 @@ export class CrossDomainAuth {
|
|
|
152
153
|
options.onMethodSelected?.('popup');
|
|
153
154
|
return await this.signInWithPopup(options);
|
|
154
155
|
} catch (error) {
|
|
155
|
-
|
|
156
|
+
logger.warn('Popup failed, falling back to redirect', { component: 'CrossDomainAuth', method: 'autoSignIn' }, error);
|
|
156
157
|
// Popup path failed — close the pre-opened popup before redirecting.
|
|
157
158
|
this.closeOrphanPopup(options.popup);
|
|
158
159
|
}
|
|
@@ -226,7 +227,7 @@ export class CrossDomainAuth {
|
|
|
226
227
|
return session;
|
|
227
228
|
}
|
|
228
229
|
} catch (error) {
|
|
229
|
-
|
|
230
|
+
logger.debug('FedCM silent sign-in did not resolve', { component: 'CrossDomainAuth', method: 'silentSignIn' }, error);
|
|
230
231
|
}
|
|
231
232
|
}
|
|
232
233
|
|
|
@@ -234,7 +235,7 @@ export class CrossDomainAuth {
|
|
|
234
235
|
try {
|
|
235
236
|
return await this.oxyServices.silentSignIn();
|
|
236
237
|
} catch (error) {
|
|
237
|
-
|
|
238
|
+
logger.debug('iframe silent sign-in did not resolve', { component: 'CrossDomainAuth', method: 'silentSignIn' }, error);
|
|
238
239
|
return null;
|
|
239
240
|
}
|
|
240
241
|
}
|
|
@@ -326,7 +327,7 @@ export class CrossDomainAuth {
|
|
|
326
327
|
};
|
|
327
328
|
}
|
|
328
329
|
} catch (error) {
|
|
329
|
-
|
|
330
|
+
logger.debug('stored session invalid', { component: 'CrossDomainAuth', method: 'initialize' }, error);
|
|
330
331
|
}
|
|
331
332
|
}
|
|
332
333
|
|