How oauth2l handles authentication flows
masterThe oauth2l tool automatically detects the appropriate authentication context based on your environment:
- Google Compute Engine (GCE) / Google Kubernetes Engine (GKE): Uses the current service account credentials if available.
- Google Cloud SDK (gcloud): Uses the current active
gcloudsession credentials. - JSON Credential Files: Use the
--credentials xxxflag to point to a service account key or OAuth client ID JSON file. - JWT (Service Accounts): Use
--type jwt --audience xxxwith a service account key to generate a signed JWT token. - SSO: Use
--type sso --email xxxto invoke an externalssocommand for Single Sign-on tokens.
Caching
By default, tokens are cached in ~/.oauth2l.
- Override location:
--cache xxx - Disable caching:
--cache ""(empty string)