Eun / oauthenticator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

oauthenticator

Actions Status Coverage Status PkgGoDev go-report

A package to help with oauth authentication.

Usage

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.

Build History

Build history

About


Languages

Language:Go 100.0%