A Go client implementation for the OAuth 2.0 authorization framework.
OAuth2 for Go is an official Go package that provides a client implementation for the OAuth 2.0 authorization framework. It enables Go applications to securely obtain and use access tokens to interact with OAuth 2.0 protected APIs and services. The package handles the complete OAuth 2.0 flow including token acquisition, refresh, and automatic authentication for HTTP requests.
Go developers building applications that need to authenticate with OAuth 2.0 protected services, such as web applications, CLI tools, or backend services integrating with third-party APIs.
As an official Go project, it offers a reliable, well-maintained, and standards-compliant implementation that integrates seamlessly with Go's HTTP client ecosystem. Developers choose it for its simplicity, automatic token management, and trusted maintenance by the Go team.
Go OAuth2
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Maintained by the Go team as part of golang.org/x, ensuring reliability, regular updates, and compatibility with Go's ecosystem, as stated in the philosophy.
Implements the full OAuth 2.0 client specification, including authorization code and client credentials grant types with automatic token refresh, per the key features.
Offers dedicated subpackages like google for easy configuration with major OAuth providers, reducing setup time for common services.
Provides an HTTP client wrapper that automatically attaches authorization tokens to requests, simplifying authenticated API calls and token management.
The package is designed solely for OAuth 2.0 clients; building authorization servers requires alternative libraries, limiting full-stack use in Go projects.
As per the README policy, new provider-specific packages are no longer accepted, forcing developers to use the generic endpoints package for custom providers, which can be less convenient.
Exclusive to Go applications, making it unsuitable for projects using other languages or requiring cross-platform authentication logic without Go integration.