@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/core",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "OxyHQ SDK Foundation — API client, authentication, cryptographic identity, and shared utilities",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -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
- console.warn('[CrossDomainAuth] FedCM failed, trying popup...', error);
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
- console.warn('[CrossDomainAuth] Popup failed, falling back to redirect...', error);
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
- console.warn('[CrossDomainAuth] FedCM silent sign-in failed:', error);
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
- console.warn('[CrossDomainAuth] Silent sign-in failed:', error);
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
- console.warn('[CrossDomainAuth] Stored session invalid:', error);
330
+ logger.debug('stored session invalid', { component: 'CrossDomainAuth', method: 'initialize' }, error);
330
331
  }
331
332
  }
332
333