[PR #4791] [CLOSED] feat(oidc): canUserRegisterClient option #13825

Closed
opened 2026-04-13 09:10:11 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4791
Author: @TheUntraceable
Created: 9/20/2025
Status: Closed

Base: canaryHead: feat/oidc-can-create-application


📝 Commits (3)

  • 3534254 Add new option for canUserRegisterClient
  • 9a115ad Do docs for new option
  • 8c3fa24 Fix term used in JSDoc

📊 Changes

3 files changed (+56 additions, -11 deletions)

View changed files

📝 docs/content/docs/plugins/oidc-provider.mdx (+18 -0)
📝 packages/better-auth/src/plugins/oidc-provider/index.ts (+28 -11)
📝 packages/better-auth/src/plugins/oidc-provider/types.ts (+10 -0)

📄 Description

Summary by cubic

Adds canUserRegisterClient to the OIDC provider to control who can register new clients, and enforces authentication for dynamic client registration. Docs updated with examples and guidance.

  • New Features

    • New OIDC option: canUserRegisterClient(user) => boolean | Promise to allow/deny client registration per user.
    • Registration now validates: authenticated session, allowDynamicClientRegistration=true, and optional user permission.
  • Migration

    • Dynamic client registration now requires an authenticated session; unauthenticated requests return UNAUTHORIZED.
    • If you need role-based control, set canUserRegisterClient; otherwise omit it to allow all authenticated users.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4791 **Author:** [@TheUntraceable](https://github.com/TheUntraceable) **Created:** 9/20/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `feat/oidc-can-create-application` --- ### 📝 Commits (3) - [`3534254`](https://github.com/better-auth/better-auth/commit/35342549fe4e2d7d3142cfbfcc0b6264f4b1a0a8) Add new option for canUserRegisterClient - [`9a115ad`](https://github.com/better-auth/better-auth/commit/9a115adfa71149317028a8a3f9c0c4ccf6295a0f) Do docs for new option - [`8c3fa24`](https://github.com/better-auth/better-auth/commit/8c3fa244afe36171186b301d83e67d966457f0c8) Fix term used in JSDoc ### 📊 Changes **3 files changed** (+56 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/oidc-provider.mdx` (+18 -0) 📝 `packages/better-auth/src/plugins/oidc-provider/index.ts` (+28 -11) 📝 `packages/better-auth/src/plugins/oidc-provider/types.ts` (+10 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Adds canUserRegisterClient to the OIDC provider to control who can register new clients, and enforces authentication for dynamic client registration. Docs updated with examples and guidance. - **New Features** - New OIDC option: canUserRegisterClient(user) => boolean | Promise<boolean> to allow/deny client registration per user. - Registration now validates: authenticated session, allowDynamicClientRegistration=true, and optional user permission. - **Migration** - Dynamic client registration now requires an authenticated session; unauthenticated requests return UNAUTHORIZED. - If you need role-based control, set canUserRegisterClient; otherwise omit it to allow all authenticated users. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 09:10:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#13825