mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 05:21:57 +00:00
28 lines
543 B
Go
28 lines
543 B
Go
package config
|
|
|
|
import (
|
|
"golang.org/x/oauth2"
|
|
"golang.org/x/oauth2/google"
|
|
)
|
|
|
|
type Config struct {
|
|
GoogleLoginConfig oauth2.Config
|
|
}
|
|
|
|
var AppConfig Config
|
|
|
|
func GoogleConfig() oauth2.Config {
|
|
AppConfig.GoogleLoginConfig = oauth2.Config{
|
|
RedirectURL: RedirectURL,
|
|
ClientID: GoogleClientID,
|
|
ClientSecret: GoogleClientSecret,
|
|
Scopes: []string{
|
|
"https://www.googleapis.com/auth/userinfo.email",
|
|
"https://www.googleapis.com/auth/userinfo.profile",
|
|
},
|
|
Endpoint: google.Endpoint,
|
|
}
|
|
|
|
return AppConfig.GoogleLoginConfig
|
|
}
|