Skip to content

v0.3.0

Choose a tag to compare

@fuongz fuongz released this 06 Apr 16:10
· 23 commits to main since this release
8e7b522

Features

New Google Auth Strategy

Added a new authentication strategy google that provides a simplified OAuth 2.0 flow for Google APIs. This strategy works identically to the existing oauth strategy but automatically configures Google's OAuth endpoints.

  • Authorization URL: https://accounts.google.com/o/oauth2/v2/auth
  • Token URL: https://oauth2.googleapis.com/token
  • Default scopes: https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive.readonly

Usage:

AUTH_STRATEGY=google
OAUTH_CLIENT_ID=your-client-id
OAUTH_CLIENT_SECRET=your-client-secret
OAUTH_SCOPES=https://www.googleapis.com/auth/drive.readonly
OAUTH_REDIRECT_URI=https://your-server.com/oauth/callback

The strategy reuses OAUTH_* environment variables, making it easy to switch between generic OAuth and Google-specific auth by just changing AUTH_STRATEGY.

Documentation

  • Updated README.md with google strategy in Authentication Strategies table
  • Added configuration variables for both OAuth and Google strategies
  • Documented preset endpoint behavior for Google strategy

Internal Changes

  • Extended AuthStrategy type to include "google"
  • Added buildGoogleProviderConfig() in input-parsers.ts for preset configuration
  • Updated buildProviderRefreshConfig() to support Google token refresh
  • Added google case handling in HTTP adapters (worker and node)