@konemono/nostr-login 1.9.7 → 1.9.9
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.esm.js +1 -1
- package/dist/unpkg.js +1 -1
- package/package.json +1 -1
- package/src/modules/AuthNostrService.ts +5 -4
package/package.json
CHANGED
|
@@ -129,9 +129,10 @@ class AuthNostrService extends EventEmitter implements Signer {
|
|
|
129
129
|
// non-iframe flow - Amber も NIP-46 経由(nostrsigner:// の代わりに nostrconnect:// を使用)
|
|
130
130
|
if (link && !iframeUrl) {
|
|
131
131
|
if (link === 'amber') {
|
|
132
|
-
// Amber
|
|
133
|
-
|
|
134
|
-
console.log('Amber flow via NIP-46
|
|
132
|
+
// Amber に nostrconnect:// URL を渡す
|
|
133
|
+
const nostrconnectUrl = await this.createNostrConnect(relays);
|
|
134
|
+
console.log('Amber flow via NIP-46, opening:', nostrconnectUrl);
|
|
135
|
+
window.location.href = nostrconnectUrl;
|
|
135
136
|
} else {
|
|
136
137
|
window.open(link, '_blank', 'width=400,height=700');
|
|
137
138
|
}
|
|
@@ -170,7 +171,7 @@ class AuthNostrService extends EventEmitter implements Signer {
|
|
|
170
171
|
perms: encodeURIComponent(this.params.optionsModal.perms || ''),
|
|
171
172
|
};
|
|
172
173
|
|
|
173
|
-
return `nostrconnect://${pubkey}?image=${meta.icon}&url=${meta.url}&name=${meta.name}&perms=${meta.perms}&secret=${this.nostrConnectSecret}${(relays || []).length > 0 ? (relays || []).map((r, i) => `&relay=${r}`) : ''}`;
|
|
174
|
+
return `nostrconnect://${pubkey}?image=${meta.icon}&url=${meta.url}&name=${meta.name}&perms=${meta.perms}&secret=${this.nostrConnectSecret}${(relays || []).length > 0 ? (relays || []).map((r, i) => `&relay=${r}`).join('') : ''}`;
|
|
174
175
|
}
|
|
175
176
|
|
|
176
177
|
public async getNostrConnectServices(): Promise<[string, ConnectionString[]]> {
|