btcintel

The provider's return

GET /v1/auth/oauth/{provider}/callback
who may call it
Anyone
no key and no session
what it costs
1 request of the quota
tiers and keys
how fresh
Never cached
every answer carries the index's height and the node's
MCP tool
None
On this page

Checks the state against the cookie (single use), exchanges the code with the PKCE verifier and verifies the ID token (issuer, audience, signature against the issuer's keys, nonce); GitHub, which issues none, is asked for the user and the verified addresses instead. Then: a provider identity bound to an account signs it in (a session at aal 1, amr [provider]; the cookie is set) and the browser lands on next; an unbound identity whose verified address has no account creates one and signs in; one whose verified address belongs to an account lands on /auth/provider?link=<token>&provider=<name> on the explorer, where the person confirms once (POST /v1/auth/oauth/confirm). Failures land on /auth/provider?error=<reason>&provider=<name>: state (no flow, expired, another browser), denied (the person stopped at the provider), provider (the exchange or the token failed), email_unverified (the provider does not vouch for an address), email_mismatch (a signed-in account asked for a link and the provider vouched for another address), bound (the identity is bound to another account). No token from the provider is stored.

Parameters

NameWhereTypeRequiredWhat it does
providerpathstringrequiredThe provider: google, github, apple or oidc. One this deployment does not configure is a 404.
codequerystringoptionalThe authorization code the provider sends back.
statequerystringoptionalThe flow's state, checked against the btci_oauth cookie of the browser that started it; single use.
errorquerystringoptionalThe provider's reason when the person stopped there.

What it answers

302

The browser lands on the explorer.

Headers: Location, Set-Cookie

Errors

StatusCodeWhen
404not_foundnot_found: what the path names is not known: not in the index (for a transaction, not in the node's mempool either), or no such record. The message says which.
501not_configurednot_configured: this deployment does not run what the route needs, for example the mempool engine, accounts, the intel store or watchlists. The message names it.

Each comes in the one error envelope, and none is cached: an error carries Cache-Control: no-store.

Example

No snippet. This route is a step of signing in, which runs in your browser on btcintel.io, so no snippet can run it from a shell. See Identity.