I am batman
This commit is contained in:
26
internal/oauth/oauth.go
Normal file
26
internal/oauth/oauth.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package oauth
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/markbates/goth"
|
||||
"github.com/markbates/goth/providers/github"
|
||||
"github.com/markbates/goth/providers/google"
|
||||
)
|
||||
|
||||
func InitProviders() {
|
||||
goth.UseProviders(
|
||||
google.New(
|
||||
os.Getenv("GOOGLE_CLIENT_ID"),
|
||||
os.Getenv("GOOGLE_CLIENT_SECRET"),
|
||||
os.Getenv("GOOGLE_CALLBACK_URL"),
|
||||
"email", "profile",
|
||||
),
|
||||
github.New(
|
||||
os.Getenv("GITHUB_CLIENT_ID"),
|
||||
os.Getenv("GITHUB_CLIENT_SECRET"),
|
||||
os.Getenv("GITHUB_CALLBACK_URL"),
|
||||
"user:email",
|
||||
),
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user