mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-03-25 16:07:54 +00:00
fix: review comments
This commit is contained in:
@@ -671,7 +671,6 @@ func (auth *AuthService) CleanupOAuthSessionsRoutine() {
|
||||
|
||||
for range ticker.C {
|
||||
auth.oauthMutex.Lock()
|
||||
defer auth.oauthMutex.Unlock()
|
||||
|
||||
now := time.Now()
|
||||
|
||||
@@ -680,6 +679,8 @@ func (auth *AuthService) CleanupOAuthSessionsRoutine() {
|
||||
delete(auth.oauthPendingSessions, sessionId)
|
||||
}
|
||||
}
|
||||
|
||||
auth.oauthMutex.Unlock()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/steveiliop56/tinyauth/internal/config"
|
||||
"github.com/steveiliop56/tinyauth/internal/utils/tlog"
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
@@ -70,7 +69,6 @@ func (s *OAuthService) GetAuthURL(state string, verifier string) string {
|
||||
}
|
||||
|
||||
func (s *OAuthService) GetToken(code string, verifier string) (*oauth2.Token, error) {
|
||||
tlog.App.Debug().Str("code", code).Str("verifier", verifier).Msg("Exchanging code for token")
|
||||
return s.config.Exchange(s.ctx, code, oauth2.VerifierOption(verifier))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user