Skip to content

Commit

Permalink
Add login.gov provider
Browse files Browse the repository at this point in the history
* add example for new login.gov provider
* sort example providers alphabetically
  • Loading branch information
andrewzah committed Apr 7, 2020
1 parent 6af3846 commit 453eecd
Show file tree
Hide file tree
Showing 7 changed files with 687 additions and 25 deletions.
Binary file added examples/examples
Binary file not shown.
57 changes: 32 additions & 25 deletions examples/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import (
"github.com/markbates/goth/providers/lastfm"
"github.com/markbates/goth/providers/line"
"github.com/markbates/goth/providers/linkedin"
"github.com/markbates/goth/providers/logingov"
"github.com/markbates/goth/providers/meetup"
"github.com/markbates/goth/providers/microsoftonline"
"github.com/markbates/goth/providers/naver"
Expand Down Expand Up @@ -142,8 +143,17 @@ func main() {
goth.UseProviders(openidConnect)
}

logingov, _ := logingov.New(os.Getenv("LOGINGOV_ISSUER_ID"), os.Getenv("LOGINGOV_REDIRECT_URI"), os.Getenv("LOGINGOV_AUTODISCOVERY_URL"))
if logingov != nil {
goth.UseProviders(logingov)
}

m := make(map[string]string)
m["amazon"] = "Amazon"
m["apple"] = "Apple"
m["auth0"] = "Auth0"
m["azuread"] = "Azure AD"
m["battlenet"] = "Battlenet"
m["bitbucket"] = "Bitbucket"
m["box"] = "Box"
m["dailymotion"] = "Dailymotion"
Expand All @@ -159,43 +169,40 @@ func main() {
m["gitlab"] = "Gitlab"
m["google"] = "Google"
m["gplus"] = "Google Plus"
m["shopify"] = "Shopify"
m["soundcloud"] = "SoundCloud"
m["spotify"] = "Spotify"
m["steam"] = "Steam"
m["stripe"] = "Stripe"
m["twitch"] = "Twitch"
m["uber"] = "Uber"
m["wepay"] = "Wepay"
m["yahoo"] = "Yahoo"
m["yammer"] = "Yammer"
m["heroku"] = "Heroku"
m["instagram"] = "Instagram"
m["intercom"] = "Intercom"
m["kakao"] = "Kakao"
m["lastfm"] = "Last FM"
m["linkedin"] = "Linkedin"
m["line"] = "LINE"
m["onedrive"] = "Onedrive"
m["azuread"] = "Azure AD"
m["linkedin"] = "Linkedin"
m["login.gov"] = "login.gov"
m["meetup"] = "Meetup.com"
m["microsoftonline"] = "Microsoft Online"
m["battlenet"] = "Battlenet"
m["naver"] = "Naver"
m["nextcloud"] = "NextCloud"
m["onedrive"] = "Onedrive"
m["openid-connect"] = "OpenID Connect"
m["paypal"] = "Paypal"
m["twitter"] = "Twitter"
m["salesforce"] = "Salesforce"
m["typetalk"] = "Typetalk"
m["seatalk"] = "SeaTalk"
m["shopify"] = "Shopify"
m["slack"] = "Slack"
m["meetup"] = "Meetup.com"
m["auth0"] = "Auth0"
m["openid-connect"] = "OpenID Connect"
m["xero"] = "Xero"
m["soundcloud"] = "SoundCloud"
m["spotify"] = "Spotify"
m["steam"] = "Steam"
m["strava"] = "Strava"
m["stripe"] = "Stripe"
m["twitch"] = "Twitch"
m["twitter"] = "Twitter"
m["typetalk"] = "Typetalk"
m["uber"] = "Uber"
m["vk"] = "VK"
m["naver"] = "Naver"
m["wepay"] = "Wepay"
m["xero"] = "Xero"
m["yahoo"] = "Yahoo"
m["yammer"] = "Yammer"
m["yandex"] = "Yandex"
m["nextcloud"] = "NextCloud"
m["seatalk"] = "SeaTalk"
m["apple"] = "Apple"
m["strava"] = "Strava"

var keys []string
for k := range m {
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ require (
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect
google.golang.org/appengine v1.2.0 // indirect
)

go 1.13

0 comments on commit 453eecd

Please sign in to comment.