From e60f9a16ebc11125dbae4c3255bf87796485aacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Wed, 3 Jul 2024 18:35:20 +0000 Subject: [PATCH] fix: add error logging --- goth.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/goth.go b/goth.go index 53b4741..5ab615f 100644 --- a/goth.go +++ b/goth.go @@ -231,6 +231,7 @@ func (CompleteAuthCompleteHandler) New(cfg Config) fiber.Handler { user, err := provider.CompleteAuth(c.Context(), cfg.Adapter, &Params{ctx: c}) if err != nil { + log.Error(err) return cfg.ErrorHandler(c, ErrMissingUser) } @@ -238,12 +239,14 @@ func (CompleteAuthCompleteHandler) New(cfg Config) fiber.Handler { duration, err := time.ParseDuration(cfg.Expiry) if err != nil { + log.Error(err) return cfg.ErrorHandler(c, ErrMissingSession) } expires := time.Now().Add(duration) session, err := cfg.Adapter.CreateSession(c.Context(), user.ID, expires) if err != nil { + log.Error(err) return cfg.ErrorHandler(c, ErrMissingSession) }