Commit Graph

1245 Commits

Author SHA1 Message Date
KinfeMichael Tariku
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
Dagmawi Babi
4c9479ee2b docs: automatic-tax-collection (#3415) 2025-07-17 21:09:42 -07:00
Maxwell
1ed38cd28b feat(docs): APIMethod, documents all server & client auth examples (#2577) 2025-07-17 16:20:10 -07:00
KinfeMichael Tariku
8bcc352856 docs: fix request lifecycle hooks example (#3434) 2025-07-17 15:48:06 -07:00
KinfeMichael Tariku
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
Bereket Engida
ea0fcdab70 Revert "feat(social-providers): add Faceit Social Provider (#3140)" (#3432)
This reverts commit 8792717b4b.
2025-07-17 10:11:45 -07:00
Matt Russell
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
56bd676534 Merge branch 'main' into v1.3 2025-07-17 10:08:46 -07:00
KinfeMichael Tariku
d9a925b315 docs: add logger option (#3171)
* docs/logging-docs

* update
2025-07-17 09:39:52 -07:00
Thalles Passos
a16ea81db4 docs: add community maintained nestjs library (#3391) 2025-07-17 00:39:38 -07:00
Pekastel
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
Matteo Urso
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
Néfix Estrada
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
BadPirate
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
KinfeMichael Tariku
dbaa342269 docs: fix plugin after hook handler example (#3372) 2025-07-14 22:16:42 -07:00
Maxwell
ea76ad1be6 docs: simplify database section on installation docs (#3383)
* docs: Improved database installation docs

* improve
2025-07-14 21:58:28 -07:00
Danny
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 Sandid
361876e9a6 docs: fix typo on hono cookies attribute example (#3366) 2025-07-14 09:35:12 -07:00
Dagmawi Babi
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
Maxwell
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
reslear
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
Maxwell
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 Tariku
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
Ephraim Duncan
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
Ayush
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
kmate19
991e200ff0 feat: add sendOnSignIn option to make sending verification link in sign in route explicit (#2422)
* feat(signin): make verification sending in sign in route explicit

* lint

* add option in docs

---------

Co-authored-by: Kinfe123 <kinfishtech@gmail.com>
2025-07-08 20:57:36 -07:00
Maxwell
e1579dc5d1 docs: add info about refresh tokens for Google & Github (#3305) 2025-07-08 08:32:45 -07:00
Ephraim Duncan
0bff4af96b feat: notion provider (#3068)
* feat: add notion provider

* chore: lint

* chore: add docs for notion provider

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-07-07 18:53:52 -07:00
KinfeMichael Tariku
3439fe954f feat(api-key): async support for verify key (#3204)
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
Co-authored-by: Bereket Engida <Bekacru@gmail.com>
2025-07-07 18:21:48 -07:00
Abdulrahman
cce6c2d74f docs(feat): added apple sign in JWT generation in docs (#2453)
* docs: Add guide for Sign In with Apple

* docs-feat: add apple JWT generator

* fix-lint: ran lint:fix to fix CI test

* chore: refactor to remove jose

* update docs

* chore: lock file

* fix test

---------

Co-authored-by: Bereket Engida <Bekacru@gmail.com>
2025-07-07 17:21:10 -07:00
Bereket Engida
e9a9e81868 ear:werge branch 'main' into v1.3 2025-07-07 13:05:45 -07:00
Bereket Engida
e3a450e70e feat(email-otp): support email verification override (#3292)
* feat(email-otp): allow overriding the default email verifier with email otp

* update docs

* cleanup
2025-07-07 10:41:28 -07:00
Maxwell
00d1e938c0 feat: Add encryption for OTPs and other verification information (#3164)
* add: email-otp plugin hashing or encrypting

* add: one-time-token hashing

* chore: cleanup

* add: magic link hashing

* add: two-factor

* chore: typo

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

* remove type from email otp hasher and encryptor

* chore: lint

* chore: fix types

* fix: types & test failing

* chore: lint

* chore: remove console.log

* refactor: remove if block awaits

* refactor: simplify OTP comparison

---------

Co-authored-by: KinfeMichael Tariku <65047246+Kinfe123@users.noreply.github.com>
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-07 09:21:54 -07:00
jyc.dev
2de1cd27f6 docs(community-adapters): Remult (#3275)
* Adding @nerdfolio/remult-better-auth

* add some spaces
2025-07-06 09:42:43 -07:00
Bereket Engida
5b2f87535c Merge remote-tracking branch 'origin/main' into v1.3 2025-07-03 11:41:56 -07:00
Bereket Engida
50924a42d5 docs: update reach out email 2025-07-03 11:40:11 -07:00
Maxwell
54cce6531c docs(community-adapters): recommend the official convex version (#3232) 2025-07-03 11:40:11 -07:00
Maxwell
eea77a5020 fix(two-factor): incorrect default OTP period & fix incorrect docs (#3231)
* docs(2fa): fix incorrect period

* fix: default period is 3 minutes

* Update packages/better-auth/src/plugins/two-factor/index.ts

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

* chore: lint

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-07-03 11:40:11 -07:00
Jed Patterson
6e291382fe feat: linear social provider (#2617)
* feature: linear oauth

* update profile map

* remove props spread from stringIcon

* update icon svg props

* updates

* update

---------

Co-authored-by: Kinfe123 <kinfishtech@gmail.com>
2025-07-03 11:36:18 -07:00
Mart van de Ven
fb303855ee docs: correct the number of fields required in the username migration (#3254) 2025-07-03 10:09:27 -07:00
George Gebbett
e24c859c64 docs: correct stripe capitalization (#3247) 2025-07-02 13:12:13 -07:00
Bereket Engida
f2bd3ba864 docs: update reach out email 2025-07-01 10:05:23 -07:00
Maxwell
6bbc86eb8a docs(community-adapters): recommend the official convex version (#3232) 2025-07-01 08:54:57 -07:00
Maxwell
6beac425dd fix(two-factor): incorrect default OTP period & fix incorrect docs (#3231)
* docs(2fa): fix incorrect period

* fix: default period is 3 minutes

* Update packages/better-auth/src/plugins/two-factor/index.ts

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

* chore: lint

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-07-01 08:54:26 -07:00
Bereket Engida
002cacbf2a Merge remote-tracking branch 'origin/main' into v1.3 2025-06-27 22:57:26 -07:00
Maxwell
557793b183 docs(organization): update description for getActiveMember function (#2555)
Refined the description to clearly convey that the function retrieves member details of the active organization.
2025-06-27 22:55:23 -07:00
Bereket Engida
dff5eb651b docs: add installtion guide on sso plugin 2025-06-27 22:48:10 -07:00
Bereket Engida
a6a66d9c7e feat: SSO plugin with OIDC and SAML support (#3185)
* fix(email-verification): improve email verification logic to check session and user email consistency (#3042)

* docs(passkey): Fixed signIn passkey props (#3014)

callbackURL doesn't exist.

* fix(email-otp): auto-verify on email otp reset (#3022)

* fix: delete user should respect freshAge config (#3075)

* fix: delete user needs to enforced through fresh age

* cleanup

* cleanup

* chore(org): add comments explaining what shimContext does (#3098)

* feat: Allow passing `id` in DB hook `create` (#3048)

* feat(database-hooks): Allow passing `id` in DB hook `create`

It's the same to using a custom `idGenerator`, except configurable by the database hook which would in theory provide more data.

A use-case is to generate the id based on user info in the user before DB hook.

Solves https://discord.com/channels/1288403910284935179/1379190465588367540/1384217435535835216

* chore: lint

* fix: tests failing

* docs: basic errs with svg props (#3102)

* docs: corrected github user email scope name (#3099)

* docs: corrected github user email scope name

* docs: cubic dev suggestion

* fix: use correct refresh token endpoint for github (#3095)

* chore: fix typo in authorize comment (#3106)

* docs: fix session parameter spelling (#3108)

* docs: input field usage on additional fields (#2991)

* fix: onLinkAccount trigger on phone number verification (#3007)

* fix: expose headers override in jwt plugin (#3019)

* expose headers override in jwt plugin

* clean up

* lint

* fix(expo): remove duplicated trusted origins

* feat: link account with idToken  (#1830)

* add idToken to link account

* add docs

* Implemented linking accounts based on idToken

* fix: tests

* docs: prevent diff

* docs: prevent diff

---------

Co-authored-by: kzlar <120426485+kzlar@users.noreply.github.com>

* feat: add Hugging Face provider (#3089)

* feat: add huggingface provider

* Add hugging face to doc

* chore: update hugging face logo

* chore: release v1.2.10

* docs: fix builder failing to open

* docs(NextJS): Improve middleware example to be more secure (#3135)

* docs(NextJS): Improve middleware example to be more secure

Users can skim code without reading the text, and LLMs can read code and miss-understand context correctly.  Our current middleware example only checks for existence of a cookie, and doesn't validate it.

While we do warn users this isn't secure, some users has raised concern in a Github issue saying it's not obvious enough for users who skim.

Also we don't provide examples on how to authenticate users on each route, we only show middleware optimistic check examples.

* Update docs/content/docs/integrations/next.mdx

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

---------

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

* fix(username): log the correct username (#3127)

* docs: fix typo in plugin (#3122)

* typo

* typo

* typo

* typo

* typo

* docs: fix typos on mcp guide (#3146)

* docs: update TanStack Start integration guide (#3142)

* fix(sveltekit): only dynamic import $app/environment once (#3152)

Co-authored-by: Work <work@Jasons-MacBook-Pro.local>

* docs: fix typo in oauth proxy documentation (#3151)

* blog: seed round announcement  (#3168)

* init

* cleanup

* fix seed round announcemnt

* fix seed round announcemnt

* seed round blog

* add nav mobile

* fix typo

* Update docs/content/blogs/seed-round.mdx

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

* Update docs/app/blog/[[...slug]]/page.tsx

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

* Update docs/app/blog/[[...slug]]/page.tsx

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

* update og

* cleanup

---------

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

* docs: fix email address

* refactor(mongo-adapter): migrate to createAdapter (#3170)

In the past we didn't have mongoDb adapter move over to createAdapter since we've seen users running into issues.

However some time ago I've merged a PR which I believe fixed the issue, and after testing the org plugin with the mongo adapter that uses `createAdapter` I don't see any issues.

* fix(api-key): update should only use by ID

* docs: fix blog page layout (#3176)

* fix/blog-page-layouts

* clean up

* docs: update contact email in seed round blog

* init

* cleanup

* feat(better-auth): add test utilities and update dependencies

- Introduced a new test utility module in `src/test-utils/index.ts` for better testing support.
- Updated `package.json` to include new test utilities in the build configuration.
- Added `oauth2-mock-server` dependency to `pnpm-lock.yaml` and `sso/package.json` for OAuth2 testing.
- Enhanced the SSO provider registration process with improved error handling.

* docs update

---------

Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
Co-authored-by: KinfeMichael Tariku <65047246+Kinfe123@users.noreply.github.com>
Co-authored-by: Undefined Ninja <74867549+0xCodeMaieutics@users.noreply.github.com>
Co-authored-by: artemoire <18062266+artemoire@users.noreply.github.com>
Co-authored-by: reslear <12596485+reslear@users.noreply.github.com>
Co-authored-by: kzlar <120426485+kzlar@users.noreply.github.com>
Co-authored-by: Eliott C. <coyotte508@protonmail.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Alessandro Bortolin <bortolin.alessandro@outlook.it>
Co-authored-by: Lakshya Thakur <lapstjup@gmail.com>
Co-authored-by: Usman S. (Max Programming) <51731966+max-programming@users.noreply.github.com>
Co-authored-by: Jason Venable <jason.venable@gmail.com>
Co-authored-by: Work <work@Jasons-MacBook-Pro.local>
Co-authored-by: Dan McGrath <daniel.mcgrath9@gmail.com>
2025-06-27 20:19:19 -07:00