This "spec" enables users to use their preferred email address when logging into a Persona-enabled site and authenticate using IndieAuth.
Here are the things that users must do to delegate Persona:
- serve a support document at
https://example.com/.well-known/browserid
that setsindieauth.com
as the authority - include a
rel="me"
email address on their personal domain - setup WebFinger on their email domain to point to their personal domain (if email and personal domains are not the same, eg.
[email protected]
v.aaronparecki.com
)
- User types in
[email protected]
. - Persona looks up support document at
https://parecki.com/.well-known/browserid
. - The support document contains
"authority": "indieauth.com"
. - Persona calls IndieAuth's provisioning page asking it to sign
[email protected]
's cert which will fail because that user doesn't have a session with IndieAuth. - Persona calls IndieAuth's login page with
[email protected]
as a param. - Persona calls IndieAuth's provisioning page asking it to sign
[email protected]
's cert which will succeeed.
- IndieAuth receives a request to log
[email protected]
in. - It needs to translate that to a domain name and present the regular IndieAuth login page (without the option to use an email for login?).
- Once it has the domain, IndieAuth sets a cookie for
[email protected]
valid for 5 minutes.
- IndieAuth extracts the domain part of the email address.
- It looks for a
rel="me"
link containing[email protected]
onhttps://parecki.com
. - If it's there, it uses that for the auth, otherwise IndieAuth does a webfinger lookup.
- IndieAuth looks at
https://parecki.com/.well-known/host-meta
. - Extracts the lrdd temlate and calls it.
- Parses the XRD response and finds the
<link rel="me">
tag. - If the tag is missing or there's more than one, abort.
- Uses the domain found in step 3 for the auth.
- IndieAuth lookups email at
https://parecki.com/.well-known/webfinger?resource=acct:[email protected]
. - Extracts the
"rel": "me"
link out of the list of links. - If that link is missing or there's more than one, abort.
- Uses the domain found in step 2 for the auth.
The session that IndieAuth creates with the client can be entirely client-side (signed with a private key owned by IndieAuth) and it contains:
- the email address of the user
- date after which the cookie should no longer be honoured (5 minutes later)
- separate expiry header to let the browser clean up old unusable cookies
- IndieAuth receives a request to sign a cert for
[email protected]
. - IndieAuth notices that there's an unexpired cookie signed with its private key.
- If the email in the signed cookie matches the one requested by Persona, a signed Persona cert is returned with an undefined (but longer than 5 minutes) validity.