Use the OAuth2 for Go package
masterThe golang.org/x/oauth2 package provides a client implementation for the OAuth 2.0 specification. It is used to handle OAuth 2.0 flows in Go applications. For detailed API documentation and usage examples, refer to the official Go package documentation.
https://pkg.go.dev/golang.org/x/oauth2