Skip to main content
People sign in to your app with their Pincast account at id.pincast.fm. Your server runs the sign-in, then sends the person’s ID token to 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 to https://id.pincast.fm/oidc/auth with these parameters:
Ask for those three scopes and no others: id.pincast.fm refuses a scope your app wasn’t given, with 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.
Authorize sends them to your 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 to https://id.pincast.fm/oidc/token. Your client id and secret go in HTTP Basic, and the verifier goes in the body:
The answer holds id_token, access_token, refresh_token, expires_in, scope and token_type. The next step uses id_token. Check state 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:
Keep person in your session. Send it as actor.id, with actor.source set to logto, in each collect:
Sending a token for a person who’s already linked answers the same link, so a returning person needs no special case. To move cards they collected as a guest, see Your app’s collection and Placecard’s.

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.