mirror of
https://github.com/unmojang/drasl.git
synced 2025-09-08 06:35:12 -04:00
Log OIDC code exchange error
This commit is contained in:
parent
e82e6f7117
commit
52a7df7a1b
2
front.go
2
front.go
@ -16,6 +16,7 @@ import (
|
|||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"html/template"
|
"html/template"
|
||||||
"io"
|
"io"
|
||||||
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"path"
|
"path"
|
||||||
@ -756,6 +757,7 @@ func FrontOIDCCallback(app *App) func(c echo.Context) error {
|
|||||||
}
|
}
|
||||||
tokens, err := rp.CodeExchange[*oidc.IDTokenClaims](context.Background(), c.FormValue("code"), oidcProvider.RelyingParty, opts...)
|
tokens, err := rp.CodeExchange[*oidc.IDTokenClaims](context.Background(), c.FormValue("code"), oidcProvider.RelyingParty, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Printf("OIDC code exchange failed with provider %s: %s", oidcProvider.Config.Name, err)
|
||||||
return NewWebError(failureURL, "OIDC code exchange failed.")
|
return NewWebError(failureURL, "OIDC code exchange failed.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user