feat(auth): add OAuth 2.1 client admin endpoints #1240
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds OAuth 2.1 client administration endpoints to
supabase-auth
based on the implementation from supabase-js.This PR implements a new
admin.oauth
namespace with full CRUD operations for managing OAuth clients when the OAuth 2.1 server is enabled in Supabase Auth.Changes
New Types (
types.py
)OAuthClient
- OAuth client object returned from the OAuth 2.1 serverOAuthClientResponse
- Response type for OAuth client operationsOAuthClientListResponse
- Response type for listing OAuth clients with paginationCreateOAuthClientParams
- Parameters for creating a new OAuth clientPageParams
andPagination
- Pagination supportNew API Classes
AsyncGoTrueAdminOAuthAPI
- Async OAuth admin APISyncGoTrueAdminOAuthAPI
- Sync OAuth admin APINew Admin Methods (
admin.oauth
)list_clients(params?: PageParams)
- List OAuth clients with optional paginationcreate_client(params: CreateOAuthClientParams)
- Register new OAuth clientget_client(client_id: str)
- Get client details by IDdelete_client(client_id: str)
- Remove OAuth clientregenerate_client_secret(client_id: str)
- Regenerate client secretTests
Implementation Notes
admin.mfa
)service_role
key and should only be called server-sideReferences
Test plan
🤖 Generated with Claude Code