Last active
September 20, 2019 14:29
-
-
Save shekodn/780f4f71028e5d38940f69c078a3a8a3 to your computer and use it in GitHub Desktop.
auth.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func init() { | |
err := godotenv.Load() | |
if err != nil { | |
log.Fatal("Error loading .env file") | |
} | |
googleOauthConfig = &oauth2.Config{ | |
RedirectURL: "http://localhost:" + os.Getenv("PORT") + "/callback", | |
ClientID: os.Getenv("GOOGLE_CLIENT_ID"), | |
ClientSecret: os.Getenv("GOOGLE_CLIENT_SECRET"), | |
Scopes: []string{"https://www.googleapis.com/auth/contacts.readonly"}, | |
Endpoint: google.Endpoint, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment