diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index 741f661..63e4bc6 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -31,6 +31,7 @@ export const Login = () => { const [isLoading, setIsLoading] = useState(false) const [loadingSpinnerDesc, setLoadingSpinnerDesc] = useState('') const [inputValue, setInputValue] = useState('') + const [authUrl, setAuthUrl] = useState() const [isNostrExtensionAvailable, setIsNostrExtensionAvailable] = useState(false) @@ -175,7 +176,11 @@ export const Login = () => { setLoadingSpinnerDesc('Creating nsecbunker singer') await nostrController .createNsecBunkerSigner(pubkey) - .then(async () => { + .then(async (signer) => { + signer.on('authUrl', (url: string) => { + setAuthUrl(url) + }) + dispatch(updateLoginMethod(LoginMethods.nsecBunker)) dispatch(updateNsecbunkerPubkey(pubkey)) @@ -216,6 +221,17 @@ export const Login = () => { return } + if (authUrl) { + return ( +