+46
who-am-i/readme.md
+46
who-am-i/readme.md
···+for now the deployment is restricted to microcosm -- expanding it for wider use likely requires solving a number of challenges that oauth exists for.+- you drop an iframe and a short few lines of JS on your web page, and get a nice-ish atproto login prompt.+- if the user has ever authorized this service before (and within some expiration), they will be presented with an in-frame one-click option to proceed.+- clickjacking: if this were allowed on arbitrary domains, malicious sites could trick users into proving their atproto identity.+- all the other problems oauth exists to solve: it's a little tricky to hook around the oauth flow so there are probably some annoying attacks.+- auth in front of auth: it's just a bit awkward to run an auth service that acts as an intermediary for a more-real auth behind it, but that's worse, less secure, and doesn't conform to any standards.+sometimes you want to make a thing that people can use with an atproto identity, and you might not want to let them put in any else's identity. apps that operate on public data like skircle, cred.blue, and the microcosm spacedust notifications demo don't require any special permission to operate for any user, and that's sometimes fine, but sometimes creepy/stalker-y/etc.+to avoid building a small torment nexus for a microcosm demo (while also not wanting to get deep into oauth or operate a demo-specific auth backend), i made this little service to just get a verified identity.+since the requirements (read-only, just verifying identity) seem modest, i was hoping that a fairly simple implementation could be Good Enough, but in the time that i was willing to spend on it, the simple version without major obvious weaknesses i was hoping for didn't emerge.+it's still nice to have an explicit opt-in on a per-demo basis for microcosm so it will be used for that. it's allow-listed for the microcosm domain however (so not deployed on any adversarial hosting pages), so it's simultaenously overkill and restrictive.+i will get back to oauth eventually and hopefully roll out a microcosm service to make it easy for clients, but there are a few more things in the pipeline to get to first.
+1
who-am-i/src/expiring_task_map.rs
+1
who-am-i/src/expiring_task_map.rs
+6
-6
who-am-i/src/main.rs
+6
-6
who-am-i/src/main.rs
······
+57
-24
who-am-i/src/server.rs
+57
-24
who-am-i/src/server.rs
·································
+11
-5
who-am-i/templates/auth-fail.hbs
+11
-5
who-am-i/templates/auth-fail.hbs
···
+21
-4
who-am-i/templates/prompt-anon.hbs
+21
-4
who-am-i/templates/prompt-anon.hbs
·········
+3
-1
who-am-i/templates/prompt-base.hbs
+3
-1
who-am-i/templates/prompt-base.hbs
+168
who-am-i/templates/return-base.hbs
+168
who-am-i/templates/return-base.hbs
···