cors-api
Installation
SKILL.md
Looker CORS API OAuth Pattern (Direct Browser Auth)
This skill describes the Direct Browser OAuth pattern for Looker. It allows frontend applications to authenticate users directly against a Looker instance and make secure API calls via CORS without requiring a custom backend proxy.
1. The Core Pattern
The pattern leverages Looker's built-in OAuth2 support with PKCE (Proof Key for Code Exchange) to safely perform the authentication flow entirely in the browser.
Architectural Components
- Browser Application: The frontend app that performs the OAuth flow and makes direct
fetchcalls to the Looker API. - Looker Auth Server: Handles user login, consent, and issues access tokens.
- Looker API: Serves data directly to the browser via CORS.
2. The OAuth2 + PKCE Flow
Because a browser application is a "public client" and cannot store secrets, PKCE is used to secure the authorization code exchange.