@explorins/pers-signer 1.0.32 → 1.0.33
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/browser.cjs.js +6 -2
- package/dist/browser.cjs.js.map +1 -1
- package/dist/browser.esm.js +6 -2
- package/dist/browser.esm.js.map +1 -1
- package/dist/index.cjs.js +6 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/react-native.cjs.js +6 -2
- package/dist/react-native.cjs.js.map +1 -1
- package/dist/react-native.esm.js +6 -2
- package/dist/react-native.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2157,12 +2157,16 @@ class PersSignerSDK {
|
|
|
2157
2157
|
*/
|
|
2158
2158
|
constructor(config) {
|
|
2159
2159
|
this.config = config;
|
|
2160
|
+
// Safe hostname/origin extraction - window.location may be undefined in React Native
|
|
2161
|
+
const hasWindowLocation = typeof window !== 'undefined' && typeof window.location !== 'undefined';
|
|
2162
|
+
const hostname = hasWindowLocation ? window.location.hostname : 'localhost';
|
|
2163
|
+
const origin = hasWindowLocation ? window.location.origin : undefined;
|
|
2160
2164
|
setConfigProvider(new WebConfigProvider({
|
|
2161
2165
|
apiUrl: config.apiUrl || SIGNER_CONFIG.DEFAULT_SIGNER_API_URL,
|
|
2162
2166
|
relyingParty: {
|
|
2163
|
-
id:
|
|
2167
|
+
id: hostname,
|
|
2164
2168
|
name: config.relyingPartyName || SIGNER_CONFIG.DEFAULT_RELYING_PARTY_NAME,
|
|
2165
|
-
origin:
|
|
2169
|
+
origin: origin,
|
|
2166
2170
|
},
|
|
2167
2171
|
}));
|
|
2168
2172
|
this.authenticationService = new AuthenticationService(this.config);
|