Skip to content

Commit e2b6a2e

Browse files
authored
Merge pull request #992 from gotify/oidc-log
fix: more oidc logging
2 parents 9f7dc63 + bb62086 commit e2b6a2e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎api/oidc.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"errors"
88
"fmt"
99
"io"
10+
"log/slog"
1011
"net/http"
1112
"net/url"
1213
"strings"
@@ -18,6 +19,7 @@ import (
1819
"github.com/gotify/server/v2/database"
1920
"github.com/gotify/server/v2/decaymap"
2021
"github.com/gotify/server/v2/model"
22+
"github.com/rs/zerolog"
2123
"github.com/rs/zerolog/log"
2224
"github.com/zitadel/oidc/v3/pkg/client/rp"
2325
httphelper "github.com/zitadel/oidc/v3/pkg/http"
@@ -39,6 +41,7 @@ func NewOIDC(conf *config.Configuration, db *database.GormDatabase, userChangeNo
3941
rp.WithCookieHandler(cookieHandler),
4042
rp.WithPKCE(cookieHandler),
4143
rp.WithSigningAlgsFromDiscovery(),
44+
rp.WithLogger(slog.New(zerolog.NewSlogHandler(log.Logger))),
4245
}
4346

4447
provider, err := rp.NewRelyingPartyOIDC(

0 commit comments

Comments
 (0)