Skip to main content

Credential storage

The desktop app stores OAuth tokens in the OS keychain — macOS Keychain or Windows Credential Manager. Credentials are tied to the desktop app process; other apps on your machine cannot read them.

What's stored where

TokenStorageLifetime
Google refresh tokenOS keychainLong-lived
Querylab.io refresh JWTOS keychain30 days
Google access tokenIn memory1 hour

The short-lived (1-hour) session JWT lives in localStorage and is refreshed from the keychain.

OAuth flow

The desktop app uses the RFC 8252 loopback redirect flow:

  1. The app starts a local server on a random port
  2. Your browser opens Google's consent page
  3. Google redirects to http://127.0.0.1:{PORT}/callback (loopback only)
  4. Tokens are exchanged directly between the app and Google
  5. Querylab.io's backend receives only an identity token to verify your account

The Google refresh token is not sent to Querylab.io's backend.

Manage credentials

  • View — Keychain Access (macOS) or Credential Manager (Windows); search "querylab"
  • Reset — Help > Reset Auth State (Cmd+Shift+R on macOS, Ctrl+Shift+R on Windows)
  • Debug — Help > Debug Auth State (shows which tokens are present without revealing values)