Skip to content

Commit 9ebabbe

Browse files
committed
fix(openid): log the token endpoint auth method on exchange failure
Makes the next failed token exchange diagnosable from the Vikunja side without having to correlate against the provider's logs.
1 parent b6495da commit 9ebabbe

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pkg/modules/auth/openid/openid.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,8 @@ func exchangeOidcTokens(cb *Callback, providerKey string) (*Provider, *oauth2.To
620620
// Parse the access & ID token
621621
oauth2Token, err := provider.Oauth2Config.Exchange(context.Background(), cb.Code)
622622
if err != nil {
623+
log.Debugf("Token exchange failed for provider %s using token_endpoint_auth_method %s", provider.Key, authStyleName(provider.Oauth2Config.Endpoint.AuthStyle))
624+
623625
var rerr *oauth2.RetrieveError
624626
if errors.As(err, &rerr) {
625627

0 commit comments

Comments
 (0)