Commit Graph
6933 Commits
Author SHA1 Message Date
MaxwellandGitHub e954c93361 docs(typescript): warn ts inference error regarding tsconfig (#3055) 2025-07-18 18:53:57 -07:00
MaxwellandGitHub 93698afd45 feat(organization): additionalFields for org, member, invitation & team (#3447)
* feat(org): additionalFields for org, member, invitation & team

* fix: tests

* chore: lint

* add: docs

* update(docs): improve wording

* feat: support client side inference

* chore: lint
2025-07-18 17:31:17 -07:00
PantotoneandGitHub 3cd2943135 fix(social-providers): twitch provider not returning if email is valid (#3453) 2025-07-18 16:48:32 -07:00
RobiandGitHub 5a24661fb6 refactor: pass both building and getRequestEvent from outside of library (#3449)
* refactor: Pass both building and getRequestEvent from outside of library
- Removes the need for importing from virtual modules at the expense of more user boilerplate

* chore: add Svelte and related dependencies to externals

* chore: lint

* refactor(docs): update SvelteKit integration docs with new building and getRequestEvent usage
2025-07-18 15:00:15 -07:00
Bereket EngidaandGitHub 7d03460470 feat: add an option to encrypt oauth tokens by default (#2552)
* feat: add an option to encrypt tokens by default

* feat(auth): add OAuth token encryption support

* refactor(auth): streamline token handling in OAuth callback by utilizing setTokenUtil

* refactor(auth): replace direct token handling with setTokenUtil for improved clarity and maintainability

* refactor(auth): unify token handling by utilizing setTokenUtil for access and refresh tokens

* docs(auth): enhance documentation for OAuth token encryption, clarifying security risks and benefits

* chore: cleanup

* update test
2025-07-18 14:00:48 -07:00
Bereket EngidaandGitHub 847fc9bfda feat(drizzle): support camel case schema generation (#2550) 2025-07-18 10:39:16 -07:00
Mohamad MohebifarandGitHub 324815a3fb chore(oidc-provider): update client validation logic for public and confidential clients (#3438) 2025-07-18 10:36:04 -07:00
KinfeMichael TarikuandGitHub 5242d82aa8 fix(open-api): include additional fields (#3439)
* open api additional field

* lint

* lint

* falsy value

* deprecated zodschema with zodtype
2025-07-18 10:10:17 -07:00
41fb4d15a8 feat(username): add custom username normalization option (#3412)
* feat(username): add custom username normalization option

* add transformer

* handle nullish values

---------

Co-authored-by: Bereket Engida <Bekacru@gmail.com>
2025-07-18 10:03:28 -07:00
KinfeMichael TarikuandGitHub f521d7bf11 docs: organization option for cancelPendingInvitationsOnReInvite (#3440)
* docs: organization option for canceling on reinvite

* default val

* lint
2025-07-18 10:02:46 -07:00
Fraol LemechaandGitHub 577ad2a97f fix(organization): allow org owner to update their own roles (#3426)
* fix: allow org owner to update their own roles

* fix(org): move the `is creator` check to the `hasPermissions` function to make it more reusable
2025-07-18 10:02:24 -07:00
d66c6c935d fix(sso): saml redirection (#3343)
* saml redirection

* loh

* lint

* dashboard

* lint

* test

* test

* function based mock idp

* redirection and callbacks

* console

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-07-17 21:58:12 -07:00
Dagmawi BabiandGitHub 4c9479ee2b docs: automatic-tax-collection (#3415) 2025-07-17 21:09:42 -07:00
KinfeMichael TarikuandGitHub ce75d25c4f fix(stripe): allow upgrading incomplete subscriptions (#2930)
* fix: subscription upgrade

* lint
2025-07-17 21:08:50 -07:00
MaxwellandGitHub 322906802f chore: lint (#3437) 2025-07-17 16:40:34 -07:00
MaxwellandGitHub d73e7b8527 chore: fix type issue (#3436) 2025-07-17 16:33:50 -07:00
MaxwellandGitHub 1ed38cd28b feat(docs): APIMethod, documents all server & client auth examples (#2577) 2025-07-17 16:20:10 -07:00
KinfeMichael TarikuandGitHub 8bcc352856 docs: fix request lifecycle hooks example (#3434) 2025-07-17 15:48:06 -07:00
8fa4c9ce7e feat(stripe): pass context obejct to stripe plugin callbacks (#2990)
* feat(stripe): pass context obejct to stripe plugin callbacks

* cleanup

* cleanup

* cleanup

* chore: lint

* fix: tests

---------

Co-authored-by: ping-maxwell <maxwell.multinite@gmail.com>
2025-07-17 14:48:11 -07:00
KinfeMichael TarikuandGitHub c27ff747ce docs: callout on getSessionCookies on security check (#3110)
* docs: add callout for getSessionCookies

* clean up

* clean up
2025-07-17 14:47:30 -07:00
Kinfe123 78e384e3f5 fix: sso typecheck 2025-07-17 23:32:47 +03:00
Kinfe123 5508b02d77 fix: zodv4 migration leftover due to conflict 2025-07-17 23:23:58 +03:00
Bereket EngidaandGitHub ea0fcdab70 Revert "feat(social-providers): add Faceit Social Provider (#3140)" (#3432)
This reverts commit 8792717b4b.
2025-07-17 10:11:45 -07:00
Matt RussellGitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>ping-maxwell
8792717b4b feat(social-providers): add Faceit Social Provider (#3140)
* create faceit provider

* include new faceit provider

* updating docs to include faceit

* Update docs/content/docs/authentication/faceit.mdx

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* Update docs/components/builder/social-provider.tsx

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* formatting

* formatting

* formatting

* Update documentation

Updated to include callout about Faceit's Redirect URL requirements

* fix: docs

* chore: cleanup

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: ping-maxwell <maxwell.multinite@gmail.com>
2025-07-17 10:10:07 -07:00
Bereket Engida 85d5c6c720 chore: release v1.3.0-beta.9 v1.3.0-beta.9 2025-07-17 10:08:50 -07:00
Bereket Engida 56bd676534 Merge branch 'main' into v1.3 2025-07-17 10:08:46 -07:00
KinfeMichael TarikuandGitHub 15452a5402 fix: mysql foreign key constraints on generate (#2828)
* fix: mysql foreign key constraints

* lint

* clean up

* clean up

* lint
2025-07-17 09:58:52 -07:00
LamiandGitHub 9c1293de50 fix(generic-oauth): error callback should avoid malformed URLs when the original URL already has query parameters (#3430) 2025-07-17 09:56:16 -07:00
6119db7a3d fix(mcp): issue with hardcoded baseURL in withMcpAuth (#2971)
* fix issue with hardcoded baseURL in withMcpAuth

* chore: lint

---------

Co-authored-by: ping-maxwell <maxwell.multinite@gmail.com>
2025-07-17 09:54:32 -07:00
KinfeMichael TarikuandGitHub d9a925b315 docs: add logger option (#3171)
* docs/logging-docs

* update
2025-07-17 09:39:52 -07:00
Bereket Engida b8cee4f188 chore: remove unused file 2025-07-17 09:34:59 -07:00
AbdallahandGitHub e02c28115d fix: schema generation when using advanced.databse.useNumberId (#3311)
* fix: schema generation when using advanced.databse.useNumberId

* fix: ci test
2025-07-17 09:06:21 -07:00
Bereket Engida 07c52b252d refactor(docs): conditionally render LLM components and fix github broken links 2025-07-17 09:02:23 -07:00
KinfeMichael TarikuandGitHub 4cff983e5c refactor: migrated all packages from Zod v3 to Zod v4 (#3399)
Refactors
- Updated all imports and type references to use zod/v4.
- Replaced deprecated or changed Zod APIs and options across the codebase.
- Adjusted validation schemas and error messages to match Zod v4 requirements.
- Updated dependencies and lockfiles to use Zod v4.
2025-07-17 08:30:02 -07:00
RobiandGitHub 0c4583c015 docs: add LLM copy button and view options components (#3423)
* feat: add LLM copy button and view options components
- update routing for LLM text generation, adding .mdx to a route now generates its .md repsresentation
- add rewrite from /docs/:path*mdx to /llms.txt/:path so ai can traverse the llms.txt as routes

* chore: lint

* chore: cubic
2025-07-17 01:16:04 -07:00
Thalles PassosandGitHub a16ea81db4 docs: add community maintained nestjs library (#3391) 2025-07-17 00:39:38 -07:00
ff54a99c55 feat(oidc): add support for public clients with PKCE authentication (#3091)
* feat(mcp): add support for public clients with PKCE authentication

  - Add conditional client authentication based on client type
  - Support public clients using PKCE without client_secret requirement
  - Add "none" to supported token endpoint authentication methods
  - Make clientSecret optional in database schema for public clients
  - Update client registration to handle public clients automatically
  - Maintain backward compatibility with confidential clients

  Fixes authentication issues with Claude.ai and other public OAuth clients
  that use PKCE (Proof Key for Code Exchange) without client secrets.

  Resolves #2813

* style: format code with prettier and fix trailing commas

* fix: resolve TypeScript errors in MCP plugin and tests

  - Fix missing loginPage in oidcConfig for MCP tests
  - Add type assertions for unknown response data types
  - Handle optional clientSecret with null coalescing operators
  - Update OIDC provider to support "none" auth method in metadata
  - Fix type compatibility issues between public and confidential clients

* fix: resolve TypeScript, Vitest, and CI compatibility issues

  - Fix missing loginPage in oidcConfig for MCP tests
  - Add type assertions for unknown response data types
  - Handle optional clientSecret with null coalescing operators
  - Update OIDC provider to support "none" auth method in metadata
  - Fix async describe callback to use synchronous setup with beforeAll
  - Use ephemeral port allocation to prevent CI port conflicts
  - Add explicit type annotations to avoid implicit any errors

* OpenAPI Schema Contract Fixed

* fix: resolve lint

* fix: ensure OAuth 2.0 spec compliance for public client registration

  - Fix public client registration to omit client_secret field entirely
  - Public clients now receive no client_secret property (was empty string)
  - Maintains backward compatibility with confidential clients
  - Addresses OAuth 2.0 Dynamic Client Registration (RFC 7591) requirements

* update docs

* remove any

* dont return secret on public client oidc

* remove any

* conditionally verify client secret

* update test

---------

Co-authored-by: Bereket Engida <Bekacru@gmail.com>
2025-07-17 00:38:19 -07:00
57c7691a7b fix(api-key): non-expiring API keys (with expiresAt set to null) were being deleted by mistake (#3413)
* fix(api-key): API Keys with expiresAt not null 

The `deleteAllExpiredApiKeys` function in the apiKey plugin deletes API keys where `expiresAt` is `null`, despite these keys being intended as non-expiring. 

This occurs because the deleteMany query does not explicitly exclude null values in the expiresAt condition. 

This leads to unexpected key deletions, affecting keys like 
`{ "_id": "6876ba254c23e91c05c9e95b", "expiresAt": null }`.

* Update index.ts

* chore: lint

---------

Co-authored-by: ping-maxwell <maxwell.multinite@gmail.com>
2025-07-17 00:36:32 -07:00
ShubhamandGitHub d130805777 fix(oidc-provider): relax offline_access scope validation by removing prompt=consent requirement (#3420) 2025-07-16 22:14:33 -07:00
CaoMeiYouRenGitHubMaxwellcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>ping-maxwell
2ac4f9db35 feat(generic-oauth): add support for additional token URL params in generic OAuth (#3410)
* feat(generic-oauth): add support for additional token URL params in generic OAuth

fix #3402

* Update packages/better-auth/src/oauth2/validate-authorization-code.ts

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* fix: syntax error

---------

Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: ping-maxwell <maxwell.multinite@gmail.com>
2025-07-16 21:13:31 -07:00
KinfeMichael TarikuandGitHub adf8be7acb fix(admin): before create hook was not triggered when creating a user through the admin plugin (#3418)
* ctx pass on the create with hook

* ctx
2025-07-16 21:12:57 -07:00
KinfeMichael TarikuandGitHub 29c76c7667 fix(dropbox): added support for the token access type option (#3419) 2025-07-16 21:11:04 -07:00
Matteo UrsoGitHubINFOR\matteou <m.urso@esaedro.com>
f9a13e71dd chore: minor clarification on have-i-been-pwned plugin
Co-authored-by: INFOR\matteou <m.urso@esaedro.com>
2025-07-16 20:41:37 -07:00
Bereket EngidaGitHubBadPiratecubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
d4fc7b4a7f feat(oidc-provider): support encrypting and hashing secrets (#3416)
* (feat:oidcProvider): Trusted Client implementation

- Add trustedClients configuration to OIDCOptions
- Add skipConsent property to Client interface
- Implement unified getClient() function for layered lookup
- Update authorize and token flows to support trusted clients
- Add comprehensive documentation and examples

* Apply suggestions from code review

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* lint

* fix: model name

* feat(oidc): implement secure client secret storage options

* chore: cleanup

---------

Co-authored-by: BadPirate <badpirate@gmail.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-07-16 19:54:11 -07:00
82b6974ffa feat(oidc): support JWKs with JWT plugin (#2755)
* fix(oidc): use JWT plugin if enabled to sign keys

* test(oidc-jwt): add comprehensive tests for OIDC JWT plugin functionality

* update docs

* refactor and cleanup

---------

Co-authored-by: Kryspin <321453+kziemski@users.noreply.github.com>
Co-authored-by: Bereket Engida <Bekacru@gmail.com>
2025-07-16 18:29:42 -07:00
BadPirateGitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>Bereket Engida
8223ddd30d feat(oidc-provider): trusted clients (#2878)
* (feat:oidcProvider): Trusted Client implementation

- Add trustedClients configuration to OIDCOptions
- Add skipConsent property to Client interface
- Implement unified getClient() function for layered lookup
- Update authorize and token flows to support trusted clients
- Add comprehensive documentation and examples

* Apply suggestions from code review

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* lint

* fix: model name

* chore: cleanup

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Bereket Engida <Bekacru@gmail.com>
2025-07-16 16:29:23 -07:00
Bereket Engida 5a55d7f1ee Merge branch 'main' into v1.3 2025-07-16 15:02:19 -07:00
ShubhamandGitHub 6f0f61a262 feat(oidc): add refresh token support to discovery document and token endpoint (#3373)
* feat(oidc): add refresh token support to discovery document and token endpoint

* types(oidc): ensure grant_types_supported is non-empty tuple

* fix(oidc): format grant_types_supported array for better readability
2025-07-16 15:00:36 -07:00
7364c169f6 fix: implement standard Base64 encoding for HTTP Basic Auth in token refresh and validation (#3388)
* fix(auth): implement standard Base64 encoding for HTTP Basic Auth in token refresh and validation

- Updated `refreshAccessToken` and `validateAuthorizationCode` functions to use standard Base64 encoding instead of URL-safe encoding for HTTP Basic Authentication.
- Ensured compatibility with providers like Notion and Twitter by adhering to OAuth2 specifications (RFC 7617).
- Set default authentication method to "basic" in the generic OAuth plugin for better consistency.

* fix(auth): utilize utility function for standard Base64 encoding in token refresh and validation

- Refactored `refreshAccessToken` and `validateAuthorizationCode` functions to use `encodeBasicAuthHeader` utility for standard Base64 encoding of HTTP Basic Authentication.
- This change enhances compatibility with providers like Notion and Twitter, adhering to OAuth2 specifications (RFC 7617).
- Simplifies the code by removing direct Buffer usage for encoding.

* use better auth utils

* fix base 64 code api

---------

Co-authored-by: Bereket Engida <Bekacru@gmail.com>
2025-07-15 13:59:40 -07:00
Fraol LemechaandGitHub 0a8c8d2bf4 chore(demo): add links to features list (#3392) 2025-07-15 09:32:45 -07:00