Skip to main content
WebStash exposes OAuth routes for external integrations that need delegated access.

Supported pieces

The current OAuth implementation includes:
  • dynamic client registration
  • authorization request inspection
  • token exchange
  • refresh token flow
  • PKCE verification for authorization code exchange

Redirect URI rules

Redirect URIs must be:
  • https://...
  • or local development URLs on http://localhost or http://127.0.0.1

Register a client

Use POST /oauth/register with:
  • client_name
  • redirect_uris
  • optional grant_types

Authorization flow

High-level flow:
  1. register a client
  2. redirect the user into the OAuth approval flow
  3. inspect pending authorization with GET /oauth/request
  4. exchange the authorization code at POST /oauth/token
  5. refresh tokens as needed

Security expectations

  • always use PKCE for authorization code flows
  • validate redirect URIs tightly
  • store refresh tokens securely
  • revoke access when an integration is no longer trusted