Skip to content

Fix revoke access token error handling#67

Merged
Anderson Valério (andersonvcv) merged 6 commits intopicsfrom
anderson/fix-revoke-error
Jun 2, 2025
Merged

Fix revoke access token error handling#67
Anderson Valério (andersonvcv) merged 6 commits intopicsfrom
anderson/fix-revoke-error

Conversation

@andersonvcv
Copy link
Copy Markdown

  • Do not stop flow if revoke fails.
  • Properly handle/log error

Motivation and Context

How Has This Been Tested?

Checklist:

  • My change requires a change to the documentation or CHANGELOG.
  • I have updated the documentation/CHANGELOG accordingly.
  • I have created a feature (non-master) branch for my PR.

@andersonvcv Anderson Valério (andersonvcv) changed the base branch from master to pics June 2, 2025 17:42
@andersonvcv Anderson Valério (andersonvcv) requested a review from a team as a code owner June 2, 2025 17:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the error handling in the revoke access token flow by ensuring that failure to revoke does not disrupt the sign-out process while logging the error appropriately.

  • Updated PicsRevokeAcessToken to return only an error instead of both response and error.
  • Modified the backendLogout logic to adapt to the changed signature and handle error logging accordingly.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pics_oauthproxy.go Updated PicsRevokeAcessToken to simplify error handling and response
oauthproxy.go Updated usage of PicsRevokeAcessToken to match the new error-return behavior
Comments suppressed due to low confidence (1)

pics_oauthproxy.go:38

  • The function name 'PicsRevokeAcessToken' appears to have a typo in 'Acess'; consider renaming it to 'PicsRevokeAccessToken' for clarity.
func PicsRevokeAcessToken(backendRevokeURL string, accessToken string, clientID string, clientSecret string) (err error) {

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@andersonvcv Anderson Valério (andersonvcv) merged commit 5a1d721 into pics Jun 2, 2025
4 checks passed
@andersonvcv Anderson Valério (andersonvcv) deleted the anderson/fix-revoke-error branch June 2, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants