| 1 | package calendar |
| 2 | |
| 3 | // POST /signin, in both modes, is rauth's Begin for EVERY address |
| 4 | // (standalone as it is; with Home through beginSignin, signin_return.go, |
| 5 | // which only keeps the page the sign-in began from). What the form answers |
| 6 | // depends on the address's domain alone, never on the allowlist: any |
| 7 | // difference between a permitted and a non-permitted address would turn |
| 8 | // this endpoint into a membership oracle. |
| 9 | // |
| 10 | // - A Keymail address (keymail.dev itself, or a domain delegating to |
| 11 | // Keymail with a `_keymail` TXT record), permitted or not, goes to |
| 12 | // Keymail. With SigninScreen on, Begin answers with a 303 to the door's |
| 13 | // own Keymail continuation (/signin?continue=…), whose meta refresh |
| 14 | // leaves for Keymail: CSP's form-action 'self' covers a form |
| 15 | // submission's whole redirect chain in Safari, so a 303 out of the POST |
| 16 | // would be refused (ruling 7a). Admission is asked only after Keymail |
| 17 | // has verified the address, by rauth's Authorize, and its refusal is |
| 18 | // the door saying so (rauth's Refused hook, App.refused): told only to |
| 19 | // someone who has just proved they hold the address. |
| 20 | // - Any other address is answered Sent, and mailQueue mails the link only |
| 21 | // if the allowlist holds it, after the response, in a worker, so not |
| 22 | // even the response time differs (signin_mail.go), and this app's |
| 23 | // sending identity is no open relay for whatever a stranger types. |
| 24 | // |
| 25 | // Both kinds of address spend the same rate budgets and parse the same |
| 26 | // way, and a failed send is logged after the response, not answered. |
| 27 | // |
| 28 | // force arrives only from the door rastrillo lands a failed Keymail |
| 29 | // exchange on (?force=1&err=keymail), and asks for an emailed link |
| 30 | // instead, so nobody is stuck. Paul ruled on 2026-10-06 that Calendar uses |
| 31 | // Keymail. |
| 32 | |