+ Most software keeps track of users by giving them a username and password. This gives the service
+ total control over their users, allowing them to ban them at any time, or sell their activity.
+
+
+ On Nostr, you control your own identity and
+ social data, through the magic of crytography. The basic idea is that you have a public key,
+ which acts as your user id, and a private key which allows you to authenticate any message
+ you send.
+
+
+ It's very important to keep private keys safe, but this can sometimes be confusing for newcomers. This is why
+ flotilla supports remote signer login. These services can store your keys securely for you,
+ giving you access using a username and password.
+
+
+
diff --git a/src/app/components/LogIn.svelte b/src/app/components/LogIn.svelte
index af400085..5c9cac76 100644
--- a/src/app/components/LogIn.svelte
+++ b/src/app/components/LogIn.svelte
@@ -3,10 +3,14 @@
import {addSession, loadHandle, nip46Perms, type Session} from "@welshman/app"
import Icon from "@lib/components/Icon.svelte"
import Field from "@lib/components/Field.svelte"
+ import Tippy from "@lib/components/Tippy.svelte"
import Button from "@lib/components/Button.svelte"
+ import Divider from "@lib/components/Divider.svelte"
import Spinner from "@lib/components/Spinner.svelte"
+ import SearchSelect from "@lib/components/SearchSelect.svelte"
import SignUp from "@app/components/SignUp.svelte"
- import InfoNostr from "@app/components/LogIn.svelte"
+ import InfoNostr from "@app/components/InfoNostr.svelte"
+ import LogInInfoRemoteSigner from "@app/components/LogInInfoRemoteSigner.svelte"
import {pushModal, clearModal} from "@app/modal"
import {pushToast} from "@app/toast"
import {loadUserData} from "@app/commands"
@@ -33,17 +37,31 @@
}
const loginWithNip46 = withLoading(async () => {
- const secret = makeSecret()
- const handle = await loadHandle(`${username}@${handler.domain}`)
+ const rootHandle = await loadHandle(`_@${domain}`)
- if (!handle?.pubkey) {
+ if (!rootHandle?.pubkey) {
+ return pushToast({
+ theme: "error",
+ message: "Sorry, we couldn't find that remote signer.",
+ })
+ }
+
+ const secret = makeSecret()
+ const {pubkey, nip46, relays = []} = await loadHandle(`${username}@${domain}`) || {}
+
+ if (!pubkey) {
return pushToast({
theme: "error",
message: "Sorry, it looks like you don't have an account yet. Try signing up instead.",
})
}
- const {pubkey, relays = []} = handle
+ const handler = {
+ domain,
+ pubkey: rootHandle.pubkey,
+ relays: rootHandle.nip46 || rootHandle.relays || nip46 || relays,
+ }
+
const broker = Nip46Broker.get(pubkey, secret, handler)
if (await broker.connect("", nip46Perms)) {
@@ -69,13 +87,8 @@
}
})
- const handler = {
- domain: "nsec.app",
- relays: ["wss://relay.nsec.app"],
- pubkey: "e24a86943d37a91ab485d6f9a7c66097c25ddd67e8bd1b75ed252a3c266cf9bb",
- }
-
let username = ""
+ let domain = 'nsec.app'
let loading = false
@@ -86,37 +99,40 @@
, which allows
you to own your social identity.
-
-