Skip to content

feat(auth): add OAuth 2.1 client admin endpoints - #1582

Merged
mandarini merged 1 commit into
masterfrom
cemal/feat-add-auth-admin-oauth-client-crud
Oct 3, 2025
Merged

mandarini merged 1 commit into
masterfrom
cemal/feat-add-auth-admin-oauth-client-crud

Conversation

@cemalkilic

Copy link
Copy Markdown
Contributor

Summary

Adds OAuth 2.1 client administration endpoints to @supabase/auth-js based on the OpenAPI specification from supabase/auth#2165.

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

New admin.oauth methods:

  • listClients() - List OAuth clients with pagination (for now, the same api with listUsers)
  • createClient() - Register new OAuth client
  • getClient() - Get client details by ID
  • deleteClient() - Remove OAuth client
  • regenerateClientSecret() - Regenerate client secret

All methods include proper error handling, follow existing patterns (similar to admin.mfa), and are only relevant when the OAuth 2.1 server is enabled in Supabase Auth.

@pkg-pr-new

pkg-pr-new Bot commented Oct 2, 2025

Copy link
Copy Markdown

Open in StackBlitz

@supabase/auth-js

npm i https://pkg.pr.new/@supabase/auth-js@1582

@supabase/functions-js

npm i https://pkg.pr.new/@supabase/functions-js@1582

@supabase/postgrest-js

npm i https://pkg.pr.new/@supabase/postgrest-js@1582

@supabase/realtime-js

npm i https://pkg.pr.new/@supabase/realtime-js@1582

@supabase/storage-js

npm i https://pkg.pr.new/@supabase/storage-js@1582

@supabase/supabase-js

npm i https://pkg.pr.new/@supabase/supabase-js@1582

commit: 5acdc8e

@mandarini

Copy link
Copy Markdown
Contributor

For PR release, try this URL for now:

npm i https://pkg.pr.new/supabase/supabase-js/@supabase/auth-js@5acdc8e

Once we have a latest release on npm from this repo, normal URLs will work!

grdsdev added a commit to supabase/supabase-swift that referenced this pull request Oct 2, 2025
Adds OAuth 2.1 client administration endpoints to support managing OAuth clients when the OAuth 2.1 server is enabled in Supabase Auth.

New admin.oauth namespace with methods:
- listClients() - List all OAuth clients with pagination
- createClient() - Create a new OAuth client
- getClient() - Get a specific OAuth client
- deleteClient() - Delete an OAuth client
- regenerateClientSecret() - Regenerate client secret

Includes comprehensive types and tests following existing patterns.

Ported from supabase-js PR: supabase/supabase-js#1582

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
grdsdev added a commit to supabase/supabase-flutter that referenced this pull request Oct 2, 2025
Add support for OAuth 2.1 client administration endpoints in the gotrue package. This feature allows server-side management of OAuth clients through the admin API.

New functionality:
- admin.oauth.listClients(): List OAuth clients with pagination
- admin.oauth.createClient(): Register new OAuth client
- admin.oauth.getClient(): Get client details by ID
- admin.oauth.deleteClient(): Remove OAuth client
- admin.oauth.regenerateClientSecret(): Regenerate client secret

Only relevant when OAuth 2.1 server is enabled in Supabase Auth. All methods require service_role key and should only be called server-side.

Ported from: supabase/supabase-js#1582

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
grdsdev added a commit to supabase/supabase-py that referenced this pull request Oct 2, 2025
Add OAuth 2.1 client administration endpoints to supabase-auth based on
the implementation from supabase-js PR #1582.

This adds a new `admin.oauth` namespace with full CRUD operations for
managing OAuth clients when the OAuth 2.1 server is enabled.

New admin.oauth methods:
- list_clients() - List OAuth clients with pagination
- create_client() - Register new OAuth client
- get_client() - Get client details by ID
- delete_client() - Remove OAuth client
- regenerate_client_secret() - Regenerate client secret

All methods include proper error handling and follow existing patterns
(similar to admin.mfa). These methods are only relevant when the OAuth
2.1 server is enabled in Supabase Auth.

References: supabase/supabase-js#1582

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

@fadymak fadymak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

Comment thread packages/core/auth-js/src/lib/types.ts Resolved
@mandarini
mandarini requested a review from grdsdev October 3, 2025 10:13
@mandarini
mandarini merged commit 5b2f8c7 into master Oct 3, 2025
@mandarini
mandarini deleted the cemal/feat-add-auth-admin-oauth-client-crud branch October 3, 2025 10:16
grdsdev pushed a commit to supabase/supabase-swift that referenced this pull request Oct 6, 2025
Adds OAuth 2.1 client administration endpoints to support managing OAuth clients when the OAuth 2.1 server is enabled in Supabase Auth.

New admin.oauth namespace with methods:
- listClients() - List all OAuth clients with pagination
- createClient() - Create a new OAuth client
- getClient() - Get a specific OAuth client
- deleteClient() - Delete an OAuth client
- regenerateClientSecret() - Regenerate client secret

Includes comprehensive types and tests following existing patterns.

Ported from supabase-js PR: supabase/supabase-js#1582

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <[email protected]>
grdsdev added a commit to supabase/supabase-flutter that referenced this pull request Oct 6, 2025
* feat(gotrue): add OAuth 2.1 client admin endpoints

Add support for OAuth 2.1 client administration endpoints in the gotrue package. This feature allows server-side management of OAuth clients through the admin API.

New functionality:
- admin.oauth.listClients(): List OAuth clients with pagination
- admin.oauth.createClient(): Register new OAuth client
- admin.oauth.getClient(): Get client details by ID
- admin.oauth.deleteClient(): Remove OAuth client
- admin.oauth.regenerateClientSecret(): Regenerate client secret

Only relevant when OAuth 2.1 server is enabled in Supabase Auth. All methods require service_role key and should only be called server-side.

Ported from: supabase/supabase-js#1582

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* test(gotrue): enable OAuth 2.1 server and fix response parsing

- Update GoTrue from v2.175.0 to v2.180.0
- Enable OAuth server with dynamic registration in test infrastructure
- Fix parsing of optional `aud` field in OAuthClientListResponse
- Handle empty response bodies (204 No Content) for delete operations
- Update delete test to expect null client on successful deletion

All OAuth admin endpoint tests now passing, matching behavior from
supabase/supabase-py#1240

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
grdsdev added a commit to supabase/supabase-py that referenced this pull request Oct 30, 2025
Add OAuth 2.1 client administration endpoints to supabase-auth based on
the implementation from supabase-js PR #1582.

This adds a new `admin.oauth` namespace with full CRUD operations for
managing OAuth clients when the OAuth 2.1 server is enabled.

New admin.oauth methods:
- list_clients() - List OAuth clients with pagination
- create_client() - Register new OAuth client
- get_client() - Get client details by ID
- delete_client() - Remove OAuth client
- regenerate_client_secret() - Regenerate client secret

All methods include proper error handling and follow existing patterns
(similar to admin.mfa). These methods are only relevant when the OAuth
2.1 server is enabled in Supabase Auth.

References: supabase/supabase-js#1582

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

# Conflicts:
#	src/auth/src/supabase_auth/_async/gotrue_admin_api.py
#	src/auth/src/supabase_auth/_sync/gotrue_admin_api.py
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