Skip to main content

Module oauth

Module oauth 

Source
Expand description

Google OAuth 2.0 Authorization Code flow helpers.

This module deliberately exposes the state and PKCE verifier to the caller: the application must persist both, bound to the authenticated EME user, consume them once on callback, and validate state before exchanging a code. This crate does not own application sessions or credential persistence.

Structs§

GoogleOAuthConfig
Credentials and callback configuration for one Google OAuth application.
GoogleTokenSet
Token material returned by Google’s token endpoint.
GoogleUserInfo
Verified account identity returned by Google’s OpenID Connect user-info endpoint.
PendingAuthorization
Values that the server must persist for a pending authorization attempt.

Enums§

CalendarScope
Minimum EME permission requested from Google.
GoogleOAuthError

Functions§

authorization_request
Build a Google consent URL and fresh CSRF/PKCE values.
exchange_code
Exchange a validated authorization code for Google tokens.
fetch_user_info
Resolve the Google account associated with an access token.
refresh_access_token
Refresh an access token using a previously stored refresh token.
revoke_token
Revoke a Google OAuth token using Google’s fixed revocation endpoint.