Appearance
OAuth Reference
TaskRatchet runs an OAuth 2.1 authorization server so a third-party app or agent can act on a user's account — creating, completing, and managing their tasks — without ever seeing the user's password or personal API key.
Building tooling for yourself only? Use a personal API Token instead and skip OAuth entirely — see the API Reference. OAuth is for building something other people will authorize.
This page covers the flow and its design decisions. For exact request/response shapes, see the OpenAPI spec — it's the source of truth and changes independently of this page.
Flow
- Register your client —
POST /oauth/register(RFC 7591 Dynamic Client Registration). No approval process: give it yourredirect_urisand you get back aclient_id. Public clients only — no client secret,token_endpoint_auth_method: "none". - Send the user to
/oauth/authorizewith yourclient_id,redirect_uri, requestedscope, and a PKCEcode_challenge(S256, required). The implicit flow (response_type=token) isn't supported. - The user approves — they log in if needed and see a consent screen listing exactly what you're asking for, scope by scope.
- Exchange the code for tokens the standard OAuth 2.1 way. Access tokens are deliberately short-lived (15 minutes) so revocation actually means something — use your refresh token rather than trying to hold onto one. Refresh tokens rotate: each refresh invalidates the old one and issues a new one, so hold onto only the latest.
Scopes
| Scope | Grants |
|---|---|
tasks:read | List and read the user's tasks |
tasks:complete | Mark tasks complete or incomplete |
tasks:write | Create and edit tasks (edits can only make a task harder — later deadline never, higher stake or earlier deadline only) |
tasks:uncle | Give up on a task early ("uncle"), triggering its charge immediately |
There's no tasks:delete — end users can't delete tasks through any interface, agents included.
Discovery
GET /oauth/.well-known/oauth-authorization-serverGET /oauth/.well-known/jwks.json
The metadata document's own authorization_endpoint/token_endpoint/jwks_uri fields currently omit the /oauth prefix — hardcode the paths above rather than trusting the document's URLs.
Revocation
Users can revoke a client's access at any time from Connected Apps in their settings. This immediately kills the refresh token; an already-issued access token keeps working until it naturally expires (up to 15 minutes).
Consent requirement
Whatever you build, never create, modify, or complete a task without the user's explicit, in-the-moment consent for that action — a task's stake is real money. A standing arrangement the user has explicitly set up in advance is the only exception.
