Skip to content

Conversation

@cemalkilic
Copy link
Contributor

@cemalkilic cemalkilic commented Oct 29, 2025

Summary

This PR adds user-facing endpoints that allow users to view and revoke their OAuth 2.1 client authorizations. This will allow users control over which applications have access to their accounts.

Changes

New Endpoints

GET /user/oauth/authorizations

Lists all OAuth clients the authenticated user has authorized.

Response:

{
  "authorized_clients": [
    {
      "client_id": "uuid",
      "client_name": "Example App",
      "client_uri": "https://example.com",
      "logo_uri": "https://example.com/logo.png",
      "scopes": ["read", "write"],
      "granted_at": "2025-10-29T12:00:00Z"
    }
  ]
}

DELETE /user/oauth/authorizations?client_id={client_id}

Revokes authorization for a specific OAuth client.

Actions performed:

  • Marks the user's consent as revoked
  • Deletes all active sessions associated with the OAuth client
  • Creates an audit log entry

Response: 204 No Content on success

@cemalkilic cemalkilic requested a review from a team as a code owner October 29, 2025 12:28
@coveralls
Copy link

coveralls commented Oct 29, 2025

Pull Request Test Coverage Report for Build 19095215430

Details

  • 73 of 91 (80.22%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 68.355%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/api/oauthserver/handlers.go 65 83 78.31%
Totals Coverage Status
Change from base Build 19065361991: 0.3%
Covered Lines: 13997
Relevant Lines: 20477

💛 - Coveralls

@cemalkilic cemalkilic merged commit cc640b2 into master Nov 5, 2025
5 checks passed
@cemalkilic cemalkilic deleted the cemal/feat-add-oauth-consent-list-and-revoke branch November 5, 2025 09:23
hf pushed a commit that referenced this pull request Nov 5, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.182.0](v2.181.0...v2.182.0)
(2025-11-05)


### Features

* **oauthserver:** add authorization list and revoke endpoints
([#2232](#2232))
([cc640b2](cc640b2))


### Bug Fixes

* hostname can be empty with redirect urls
([#2241](#2241))
([f5a4cba](f5a4cba))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants