Skip to content

Commit 6836cea

Browse files
committed
support the gorilla mux provider
1 parent 3acbc12 commit 6836cea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gothic/gothic.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"net/http"
1414
"os"
1515

16+
"github.com/gorilla/mux"
1617
"github.com/gorilla/sessions"
1718
"github.com/markbates/goth"
1819
)
@@ -174,6 +175,11 @@ var GetProviderName = getProviderName
174175

175176
func getProviderName(req *http.Request) (string, error) {
176177
provider := req.URL.Query().Get("provider")
178+
if provider == "" {
179+
if p, ok := mux.Vars(req)["provider"]; ok {
180+
return p, nil
181+
}
182+
}
177183
if provider == "" {
178184
provider = req.URL.Query().Get(":provider")
179185
}

0 commit comments

Comments
 (0)