@konemono/nostr-login 1.9.2 → 1.9.3
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/AmberDirectSigner.ts +5 -1
package/package.json
CHANGED
|
@@ -123,8 +123,12 @@ export class AmberDirectSigner implements Signer {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
public generateUrl(content: string, type: string, id: string, pubkey?: string): string {
|
|
126
|
-
const
|
|
126
|
+
const baseUrl = window.location.href.split('#')[0].split('?')[0];
|
|
127
127
|
const encodedContent = encodeURIComponent(content || '');
|
|
128
|
+
|
|
129
|
+
// callbackUrl にはベースURLに結果パラメータのプレースホルダーを含める
|
|
130
|
+
// Amberが戻ってくる時に ?event=<result> が追加される
|
|
131
|
+
const callbackUrl = `${baseUrl}?event={result}`;
|
|
128
132
|
const encodedCallback = encodeURIComponent(callbackUrl);
|
|
129
133
|
|
|
130
134
|
localStorage.setItem('amber_last_type', type);
|