Skip to main content
Version: 0.5.0 (Previous)

🔗 OAuth Blocks

OAuth blocks provide the primitives to integrate third-party OAuth providers into NodeBlocks services. The initial provider is Google; the design allows for expansion to other providers.


📦 Block Types

🔍 Schemas

JSON Schema/OpenAPI definitions used to validate and describe OAuth-related endpoints.

  • fpQueryParameter: Fingerprint tracking parameter
  • purposeQueryParameter: Flow purpose (oauth-login | oauth-signup)
  • redirectUrlQueryParameter: Client redirect URL after OAuth
  • typeIdQueryParameter: Optional identity type identifier
  • stateQueryParameter: OAuth callback state verifier
  • googleOauthSchema: OAuth initiation schema (query-only, empty body)

View OAuth Schema Blocks →

🚀 Features

Composed features that combine schemas, routes, and blocks for end-to-end OAuth flows.

  • googleOAuthFeature: OAuth initiation workflow
  • googleOAuthCallbackFeature: OAuth callback processing and redirect

View OAuth Feature Blocks →

🛣️ Routes

HTTP endpoint definitions for OAuth initiation and callbacks.

  • googleOAuthRoute: GET /auth/oauth/google — Initiate Google OAuth
  • googleOAuthCallbackRoute: GET /auth/oauth/google/callback — Handle callback and redirect

View OAuth Route Blocks →

⚙️ Blocks

Pure business logic functions for OAuth flow orchestration.

  • requestGoogleOAuth: Initiate provider flow with signed state
  • authenticateGoogleOAuth: Authenticate provider callback and read profile
  • extractOAuthLoginState: Decode and validate OAuth state token
  • verifyGoogleOAuth: Map provider profile to identity; create or resolve
  • generateRedirectURL: Build redirect URL with onetime/access token

View OAuth Blocks →


📚 Navigation