POST /people once per sign-in. After that, your key can record their collects and claims.
The code below comes from the server in Your first collect, which has the whole file.
Register your app
Pincast registers your app during your invite. Write to andrew@pincast.fm with your app’s name and the id you’d like, its exact sign-in addresses (no wildcards), and the https addresses of its home page, logo, terms and privacy policy. Your app becomes a Traditional app on id.pincast.fm: its sign-in runs on your server, next to your key. You receive three values in a private file:
To add or change a sign-in address later, email it to andrew@pincast.fm.
Send the person to sign in
Redirect the person tohttps://id.pincast.fm/oidc/auth with these parameters:
invalid_scope.
After signing in, the person sees a consent screen with:
- Your app’s name and logo, beside Pincast’s.
- The account they’re signing in with.
- What your app asks for: “Your name, username, avatar, and other profile info”.
- Cancel and Authorize.
- Links to your terms and privacy policy.
redirect_uri with code and state. Cancel sends them back with error in place of a code.
Exchange the code
From your server, post the code tohttps://id.pincast.fm/oidc/token. Your client id and secret go in HTTP Basic, and the verifier goes in the body:
id_token, access_token, refresh_token, expires_in, scope and token_type. The next step uses id_token.
Link the person
Checkstate first, then exchange the code and send the ID token to POST /people, once per sign-in:
POST /people answers with the person’s id:
person in your session. Send it as actor.id, with actor.source set to logto, in each collect:
What your app receives
The ID token is a JWT signed with ES384, and it lasts one hour. It holds:
Your app doesn’t receive the person’s email address. The token has no
email claim. If your app needs an address, ask the person for it in your app.
The token answer also carries a refresh token, because the scopes include offline_access. Recording collects doesn’t need it. If you keep one, keep it on your server, like your secret.
Placecard reads only the token’s issuer, subject, audience and times, and keeps none of the person’s profile.
When a call is refused
Errors lists every code.