A package to help with oauth authentication.
client, err := oauthenticator.Authorize(
oauthenticator.ClientID("client_id"),
oauthenticator.ClientSecret("client_secret"),
oauthenticator.Scopes("https://www.googleapis.com/auth/youtube"),
oauthenticator.AuthURL("https://accounts.google.com/o/oauth2/auth"),
oauthenticator.TokenURL("https://accounts.google.com/o/oauth2/token"),
oauthenticator.TokenFile("google.token.json"),
)
The package will start a http server on :8000
and will wait for the code.
You can tweak that by using RedirectAddress
and LocalBindAddress
.