

Gets an OAuth 2.0 token for a command-line program through the user's browser. GetToken starts a server on localhost:8080, opens /auth, which redirects to the provider's consent page, and exchanges the code the provider sends back to /callback (register http://localhost:8080/callback as a redirect URL). With a service name, the token is cached under the system temp directory, one file per set of scopes, and refreshed when it expires. GetClient returns an *http.Client that uses that token.
Contributing
Contributions are welcome — please open an issue or a pull request on GitHub.
License
This project is licensed under the Apache 2.0 License.