From 2ef2e68818d07a6143a4a4b675dc07f4c754a57f Mon Sep 17 00:00:00 2001 From: Takanori Hirano Date: Wed, 20 Aug 2025 11:13:30 +0000 Subject: [PATCH] fix: remove oauth2.AccessTypeOffline from AuthCodeURL calls Remove oauth2.AccessTypeOffline parameter from AuthCodeURL calls in both GitHub and Google OAuth providers as it's not needed for the authorization code flow and may cause issues with some OAuth implementations. --- pkg/auth/github.go | 2 +- pkg/auth/google.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/auth/github.go b/pkg/auth/github.go index df83505..573abaf 100644 --- a/pkg/auth/github.go +++ b/pkg/auth/github.go @@ -46,7 +46,7 @@ func (p *githubProvider) AuthURL() string { } func (p *githubProvider) AuthCodeURL(c *gin.Context, state string) (string, error) { - authURL := p.oauth2.AuthCodeURL(state, oauth2.AccessTypeOffline) + authURL := p.oauth2.AuthCodeURL(state) return authURL, nil } diff --git a/pkg/auth/google.go b/pkg/auth/google.go index b19d74e..de3b3a4 100644 --- a/pkg/auth/google.go +++ b/pkg/auth/google.go @@ -42,7 +42,7 @@ func (p *googleProvider) RedirectURL() string { } func (p *googleProvider) AuthCodeURL(c *gin.Context, state string) (string, error) { - authURL := p.oauth2.AuthCodeURL(state, oauth2.AccessTypeOffline) + authURL := p.oauth2.AuthCodeURL(state) return authURL, nil }