ใƒกใ‚คใƒณใ‚ณใƒณใƒ†ใƒณใƒ„ใพใงใ‚นใ‚ญใƒƒใƒ—
ใƒใƒผใ‚ธใƒงใƒณ: 0.6.0 (Latest)

๐Ÿ”— OAuth Blocks

OAuth blocks provide the primitives to integrate third-party OAuth providers into NodeBlocks services. Providers currently supported: Google and Twitter. 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)
  • twitterOauthSchema: 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
  • twitterOAuthFeature: OAuth initiation workflow
  • twitterOAuthCallbackFeature: 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
  • twitterOAuthRoute: GET /auth/oauth/twitter โ€” Initiate Twitter OAuth
  • twitterOAuthCallbackRoute: GET /auth/oauth/twitter/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
  • prepareTwitterCallbackState: Build state object for Twitter callback
  • requestTwitterOAuth: Initiate Twitter authentication request
  • authenticateTwitterOAuth: Authenticate Twitter callback
  • verifyTwitterOAuth: Map Twitter profile to identity; create or resolve

View OAuth Blocks โ†’


๐Ÿ“š Navigationโ€‹