Commit Graph
3707 Commits
Author SHA1 Message Date
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 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
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
KinfeMichael TarikuandGitHub be511008f1 chore: refactor admin plugin schema (#3371)
* admin plugin type isolation

* lint

* import

* import
2025-07-14 22:18:07 -07:00
KinfeMichael TarikuandGitHub dbaa342269 docs: fix plugin after hook handler example (#3372) 2025-07-14 22:16:42 -07:00
MaxwellandGitHub ea76ad1be6 docs: simplify database section on installation docs (#3383)
* docs: Improved database installation docs

* improve
2025-07-14 21:58:28 -07:00
MaxwellandGitHub 8bd66308e2 fix(next-cookies): Don't throw in monorepo workspaces (#3381) 2025-07-14 14:54:06 -07:00
DannyandGitHub f569ff1402 docs: extend rate limiting docs and add small warning (#3365)
* refactor: remove useless variable assignment

* refactor: remove unused param

* docs: extend rate limit docs to include info about connecting ip address and how it's used

* fix: linting
2025-07-14 09:38:06 -07:00
Ahmad SandidandGitHub 361876e9a6 docs: fix typo on hono cookies attribute example (#3366) 2025-07-14 09:35:12 -07:00
Andrew PattonandGitHub 7835167b82 fix: add image option to signUpEmail types and schema (#3357)
`signUpEmail` destructures the optional `image` field from the request body and uses it when creating the user, but the field isn’t in the `requestBody` schema or the `$Infer` `body` type
2025-07-12 13:13:21 -07:00
Dagmawi BabiandGitHub 3fed4c0f70 docs: fixed errors and typos in plugin docs (#3349)
* fixed typo in plugin docs

* fixed weird sentence in plugin docs

* fixed ts error in plugins docs
2025-07-12 00:05:56 -07:00
KinfeMichael TarikuandGitHub de20ad60aa refactor: organization types (#3342)
* org options type export

* lint

* typecheck
2025-07-11 10:01:40 -07:00
KinfeMichael TarikuandGitHub c3b1ddf5ea chore: org check slug test suite (#3345)
* check slug test

* lint
2025-07-11 09:39:49 -07:00
MaxwellandGitHub 3547c9d09a feat(organization): listUserInvitations adds the ability to list all invitations for a given user (#3121)
* feat(org): listUserInvitations

This PR introduces  in the org plugin.

* chore: lint
2025-07-10 23:58:12 -07:00
reslearandGitHub 8ac324f64d docs(api-key): add example on how to get user session on the server (#3333)
how to get user session on server example
2025-07-10 23:56:35 -07:00
Alec LarsonandGitHub 6e4c2fe563 chore(docs): fix callbackURL description of signInUsername endpoint (#3339) 2025-07-10 17:54:58 -07:00
Alexander LyonandGitHub 9c3a1388b2 fix: don't require email for account linking (#3335)
We throw errors on both code paths despite it not being used when linking. Move the error to after the link case so that we only bail on missing info if that missing info is actually needed.
2025-07-10 14:03:54 -07:00
MaxwellandGitHub 79f5f73291 feat(api-key): requireName to enforce name on keys (#3129)
* feat(api-key): `requireName` to force require name on keys

* chore: lint
2025-07-10 11:17:00 -07:00
KinfeMichael TarikuandGitHub a2029ef7fd fix: linking accounts for anon users with one tap and passkey (#3124)
* typo

* typo

* linking accounts

* clean up

* clean up

* clean up

* clean up
2025-07-10 11:15:37 -07:00
Bereket Engida c4c9530602 chore: release v1.3.0-beta.8 v1.3.0-beta.8 2025-07-10 11:12:07 -07:00
843482fe4a feat: add slack social provider (#3315)
* feat: add slack provider

* feat: add slack provider docs

* chore:lint

* chore:lint

* docs: add is new flag

---------

Co-authored-by: Bereket Engida <Bekacru@gmail.com>
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-07-10 11:11:34 -07:00
Bereket Engida ed8fbb890f Merge remote-tracking branch 'origin/main' into v1.3 2025-07-10 10:12:11 -07:00
Dagmawi BabiandGitHub b03230688a chore: improved contribution guide (#3332) 2025-07-10 09:32:25 -07:00
816003b655 docs: add autumn billing plugin (#3331)
* docs: add Autumn Billing plugin

* use stepper for setup and cleanups

* add autumn's discord

* chore:lint

---------

Co-authored-by: Bereket Engida <Bekacru@gmail.com>
2025-07-10 09:19:27 -07:00
Alec LarsonandGitHub 1c6a1dcf9f feat: add rememberMe option to signUpEmail (#3325) 2025-07-09 22:07:15 -07:00
Alec LarsonandGitHub 63921f6eec fix(username): add callbackURL option to signInUsername (#3324) 2025-07-09 22:04:39 -07:00
Bereket Engida b766b22865 chore: lint 2025-07-09 08:13:33 -07:00
VagarthandMaxwell bda8aabf33 fix: update Discord link to use the correct invite URL in blogs section 2025-07-09 22:37:15 +10:00
reslearandGitHub ab25180ec2 fix: correct way detect facebook limited token jwt (#2877) 2025-07-09 02:25:10 -07:00