-
You send the customer to Entire. Make an unguessable state value, tie it to the customer’s browser session (for example in a signed, HttpOnly cookie), and redirect to:
-
The customer approves. They sign in to Entire, choose a project they manage, and choose all of its repositories or a list. The page shows the permissions you registered. For
repositories:createit shows “Create repositories in this project”. Only people who manage the project can install plugins. -
Entire sends the customer back. On approval, the browser returns to your
redirect_uriwith two query parameters,receiptandstate. If the customer cancels, it returns witherror=access_deniedand the state instead. - You verify the receipt. Check every item in the list below before you trust it.
- You store the installation ID. It is the only key you need. Show the customer a confirmation page.
Verifying an install receipt
The receipt is a compact JWT signed with EdDSA. The SDK’sApp.AcceptReceipt does all of this:
- The
statequery parameter equals the state you stored for this browser session. Compare in constant time. Reject a mismatch as an invalid callback; it can also mean the browser session or stored state was lost. - The header
typisentire-install-receipt+jwt, andalgisEdDSA. - The
issclaim is one of Entire’s Cores. Check this before you fetch keys, because the issuer decides where the keys come from. - The signature verifies against the key named by
kidin the issuer’s JWKS at{iss}/.well-known/jwks.json. audincludes your registered receipt audience (normallyurn:entire:plugin:{slug}), configured asConfig.Audiencein the SDK, andplugin_idis your slug.- The receipt passes expiry validation. Receipts last five minutes; the SDK allows one minute of clock leeway. Verify them as soon as they arrive.
- The
stateclaim inside the receipt equals your stored state. - You have not accepted this
jtibefore.
installation_id and project_id. It proves issuance at consent time, not continuing access: later API calls still check the installation’s live authority.
Project identity
Storeproject_id when you need to identify the project. For display, use project_name and forge:
project_name is the native project’s name or the mirror owner’s account or organization login. forge is entire or github. Names can change, and an Entire project and a mirror can have the same name, so keep the name and forge together and use the ID as your key.
The receipt’s older project string stays unchanged for compatibility. For a mirror it can be an internal name such as gh:mirrors:.... Don’t use it for display.
Installation webhooks put the same information in a project object. On a webhook it is under event.payload.installation:
project.id as the identifier and project.name with project.forge for display. The existing project_id stays and equals project.id.
The display fields are optional. Older receipts and events lack them, and Entire omits them when it cannot look up the public project name. Keep processing the installation using its IDs; missing display metadata doesn’t revoke access.
The receipt and installation events also include manage_url when available. Link to it from your settings so the customer can manage the installation. Store it before uninstall: installation.deleted doesn’t include it. Don’t parse it to find the project’s name or forge.