@explorins/pers-signer 1.0.6 → 1.0.8

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/index.cjs.js CHANGED
@@ -469,7 +469,8 @@ const SIGNER_CONFIG = {
469
469
  * Default relying party name for WebAuthn operations
470
470
  * This appears in the browser's authentication prompts
471
471
  */
472
- DEFAULT_RELYING_PARTY_NAME: 'PERS Signer'};
472
+ DEFAULT_RELYING_PARTY_NAME: 'PERS Signer',
473
+ DEFAULT_RELYING_PARTY_ID: 'signer.pers.ninja'};
473
474
 
474
475
  /**
475
476
  * Get PERS API base URL with staging option
@@ -1665,9 +1666,9 @@ class DfnsBrowserWebAuthnProvider {
1665
1666
  async function getBrowserWebAuthnProvider() {
1666
1667
  const config = {
1667
1668
  relyingParty: {
1668
- id: typeof window !== 'undefined' ? window.location.hostname : 'pers.ninja',
1669
- name: 'PERS Blockchain Signer',
1670
- origin: typeof window !== 'undefined' ? window.location.origin : 'https://pers.ninja',
1669
+ id: typeof window !== 'undefined' ? window.location.hostname : SIGNER_CONFIG.DEFAULT_RELYING_PARTY_ID,
1670
+ name: SIGNER_CONFIG.DEFAULT_RELYING_PARTY_NAME,
1671
+ origin: typeof window !== 'undefined' ? window.location.origin : SIGNER_CONFIG.DEFAULT_RELYING_PARTY_ID,
1671
1672
  }
1672
1673
  };
1673
1674
  return new DfnsBrowserWebAuthnProvider(config);
@@ -1737,8 +1738,8 @@ class DfnsReactNativeWebAuthnProvider {
1737
1738
  async function getReactNativeWebAuthnProvider() {
1738
1739
  const config = {
1739
1740
  relyingParty: {
1740
- id: 'pers.ninja',
1741
- name: 'PERS Blockchain Signer',
1741
+ id: SIGNER_CONFIG.DEFAULT_RELYING_PARTY_ID,
1742
+ name: SIGNER_CONFIG.DEFAULT_RELYING_PARTY_NAME,
1742
1743
  }
1743
1744
  };
1744
1745
  return new DfnsReactNativeWebAuthnProvider(config);