Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/auth/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/auth/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing oauth2.AccessTypeOffline may prevent obtaining refresh tokens for Google OAuth. For Google's OAuth2 implementation, AccessTypeOffline is typically required to receive refresh tokens that allow offline access to user data. Consider if refresh token functionality is needed for this application.

Suggested change
authURL := p.oauth2.AuthCodeURL(state)
authURL := p.oauth2.AuthCodeURL(state, oauth2.AccessTypeOffline)

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refresh tokens are not used.

return authURL, nil
}

Expand Down