Commit Graph
4400 Commits
Author SHA1 Message Date
669ce3e6b7 fix(reddit): refresh access token should use basic auth (#3753)
* reddit auth type

* changesets

* chore: remove changeset

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-08-04 12:50:24 -07:00
KinfeMichael TarikuandGitHub 375fff5ac1 fix(org): use correct slug lookup when setting active org 2025-08-03 12:54:40 +03:00
5124b40283 chore: upgrade TypeScript version (#3748)
* chore: fix TypeScript to a correct version

* fixup! chore: fix TypeScript to a correct version

* chore: fix typecheck

---------

Co-authored-by: Bereket Engida <Bekacru@gmail.com>
2025-08-02 10:18:55 -07:00
chunterbandGitHub 85415ac768 fix(plugins): export siwe plugin (#3503)
* fix(plugins): export siwe plugin

* fix(plugins): export siweClient from client plugins

* fix(plugins): siwe plugin client types
2025-08-02 09:47:08 -07:00
2d8d05330d fix(cli): --yes option does not work on @better-auth/cli generate (#3749)
* fix: do not prompt before overwriting schema on `@better-auth/cli generate --yes ...`

* chore: changeset

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-08-02 08:58:44 -07:00
Bereket Engida fed08b1587 chore: add delete user disabled test 2025-08-01 15:14:29 -07:00
91cae8aa1e docs: fix wrong cancelUrl and returnUrl descriptions (#3647)
* docs: fix wrong cancelUrl and returnUrl descriptions

* chore: changeset

* chore: update changeset

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-08-01 09:43:48 -07:00
e5f3f31311 feat(passkey): allow custom passkey name during registration (#3587)
* feat(passkey): allow custom passkey name during registration

* lint

* docs: specify name prop in passkey docs

* chore: add changeset

* chore: changeset

* chore: update changeset

* remove changest

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-08-01 09:43:35 -07:00
7fa90f8d4d fix(organization): updated types for the user argument in allowUserToCreateOrganization to support custom fields (#3600)
* fix: organization allowUserToCreateOrganization user argument typing

* chore: changeset

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-08-01 08:45:14 -07:00
KinfeMichael TarikuandGitHub c726753e69 feat: support multiple aud for apple oauth (#3710)
* support multiple aud

* update

* update

* changeset
2025-08-01 08:10:57 -07:00
4833a4b395 fix: incorrect initialization of remaining value within API key (#3648)
* Fixes #3640 - Resolves issue related to incorrect initialization of remaining value within API key.

* Adding test cases for fix of #3640.

* chore: update changeset

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-08-01 00:22:15 -07:00
Bereket EngidaandGitHub 4d85d8709d revert "fix(username): isUsernameAvailable should validate usernames (#3680)" (#3730)
This reverts commit e60f780f28.
2025-07-31 23:53:32 -07:00
MaxwellandGitHub e60f780f28 fix(username): isUsernameAvailable should validate usernames (#3680) 2025-07-31 23:50:22 -07:00
Bereket Engida 5ce1473b19 chore: release v1.3.5-beta.1 2025-07-31 23:16:10 -07:00
Shawn ErquhartandGitHub 142136076a fix: cast dates from session to Date when using date methods (#3704)
* fix: cast dates from session to Date when using date methods

* add changeset
2025-07-31 23:15:19 -07:00
Grant GandGitHub 60c92fab0b fix(jwt): expose jwt options to plugins (#3726) 2025-07-31 22:27:26 -07:00
b27221b356 feat: return false from generateId callback to imply database-generated ID (#3723)
* feat: return false from generateId to imply database-generated ID

* chore: add changeset

* chore: update changeset

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-07-31 17:21:34 -07:00
KinfeMichael TarikuandGitHub 67f84d5d94 fix(expo): improve cookie expiration handling (#3705)
* fix: cookie expiration in expo

* changesets
2025-07-31 16:32:54 -07:00
Bereket EngidaandGitHub 2ec8cad610 fix(stripe): fallback to subscription id instead of picking the first sub if id is provided (#3696)
* fix(stripe): fallback to subscription id instead of picking the first if subId is provided

* chore(changeset): add changeset for fallback to subscription id in stripe
2025-07-29 20:59:22 -07:00
Xuezhou DaiandGitHub d1d593f2d1 fix(admin): export type definitions from the admin plugin (#3628) 2025-07-29 14:22:34 -07:00
978b28588e chore: remove unnecessary console log (#3691)
* chore: cleanup log

* chore: add changeset

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-07-29 10:47:14 -07:00
29c0df5f12 fix: pass loginHint to Microsoft oauth URL (#3663)
* Pass `loginHint` to Microsoft OAuth URL

* chore: lint

* chore: add changeset

---------

Co-authored-by: Bereket Engida <Bekacru@gmail.com>
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-07-27 21:55:51 -07:00
ChaseandGitHub e4af2530f0 fix: twitter refresh token requires basic authentication (#3652)
* Use basic auth for refreshing token

* change set
2025-07-27 13:13:59 -07:00
Bereket EngidaandGitHub a536de91c2 fix(stripe): update customer id should also trigger secondary storage update (#3635)
* fix: update customer id should also update secondary storage

* chore: add changeset
2025-07-26 12:07:55 -07:00
23d6f30b41 chore: ensure zod version alignment via peerDependency (#3619)
* zodv4

* fix

* lock

* pkg

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-07-26 09:02:54 -07:00
Bereket Engida 02f19810d6 chore(release): version packages 2025-07-26 01:10:54 -07:00
Bereket EngidaGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
776c4ae3fe chore(release): version packages (#3623)
* chore(release): version packages

* chore: remove lock file

* chore: fix ci

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-26 00:56:29 -07:00
Bereket EngidaandBereket Engida be544ce355 chore: release v1.3.4-beta.3 2025-07-26 00:35:37 -07:00
5bfabed2b2 fix: cast dates from db to Date when using date methods (#3611)
* docs(api-key): move schema section to the bottom

* fix: shouldn't refresh a token if access token expires is undefined or null (#3577)

* fix: ensure session is added to context when reading from cookie cache (#3578)

When session data is present in the cookie, `get-session` was
early-returning without adding the session to the context, causing hooks
to receive a null session.
This change ensures the session is consistently added to the context.

* chore: export siwe in better-auth/plugins (#3596)

The docs were using this import path, yet `siwe` wasn't exported there. This PR fixes this.

* chore: fix cookies test

* docs: make client-side vs. server-side explicit (#3603)

* docs: fix broken link to ERC-4361 in siwe docs (#3604)

* fix(jwt): ensure alg is added to the jwks when generating via /token endpoint (#3601)

* fix: Ensure alg is added to the jwks when generating via /token endpoint

* chore: resolve linting issues

* fix: cast dates from db to Date when using date methods

* fix lint

---------

Co-authored-by: Bereket Engida <Bekacru@gmail.com>
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
Co-authored-by: Gagan G <80091397+gaganref@users.noreply.github.com>
Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
Co-authored-by: Justin <127172022+jl33-ai@users.noreply.github.com>
Co-authored-by: Fraol Lemecha <fraol0912@gmail.com>
Co-authored-by: Elliott Minns <elliott.minns@pm.me>
2025-07-26 00:35:37 -07:00
8a50ac4b0c chore: improve client inference for organization additional fields (#3612)
* docs(api-key): move schema section to the bottom

* fix: shouldn't refresh a token if access token expires is undefined or null (#3577)

* fix: ensure session is added to context when reading from cookie cache (#3578)

When session data is present in the cookie, `get-session` was
early-returning without adding the session to the context, causing hooks
to receive a null session.
This change ensures the session is consistently added to the context.

* chore: export siwe in better-auth/plugins (#3596)

The docs were using this import path, yet `siwe` wasn't exported there. This PR fixes this.

* chore: fix cookies test

* fix: client inference for organization additional fields

* improve additional fields

* fix build

* fix test

---------

Co-authored-by: Gagan G <80091397+gaganref@users.noreply.github.com>
Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
2025-07-26 00:35:37 -07:00
Bereket EngidaandBereket Engida fbff0e8781 chore: release v1.3.4-beta.2 2025-07-26 00:35:37 -07:00
Bereket EngidaandBereket Engida 847ee881d6 docs: add list member 2025-07-26 00:35:37 -07:00
Bereket EngidaGagan Gcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
e8b3d2c26b feat: list organization memebrs with pagination and filter queries (#3581)
* docs(api-key): move schema section to the bottom

* fix: shouldn't refresh a token if access token expires is undefined or null (#3577)

* fix: ensure session is added to context when reading from cookie cache (#3578)

When session data is present in the cookie, `get-session` was
early-returning without adding the session to the context, causing hooks
to receive a null session.
This change ensures the session is consistently added to the context.

* feat(organization): add membersLimit param to allow to fetch more or less members than the membership limit

* add test

* Update packages/better-auth/src/plugins/organization/adapter.ts

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

* feat(organization): add list members with pagination and filter

* chore: lint

* cleannup

---------

Co-authored-by: Gagan G <80091397+gaganref@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-07-26 00:35:37 -07:00
Bereket EngidaGagan Gcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
518ab70495 feat(organization): add membersLimit param to allow to fetch more or less members than the membership limit (#3580)
* docs(api-key): move schema section to the bottom

* fix: shouldn't refresh a token if access token expires is undefined or null (#3577)

* fix: ensure session is added to context when reading from cookie cache (#3578)

When session data is present in the cookie, `get-session` was
early-returning without adding the session to the context, causing hooks
to receive a null session.
This change ensures the session is consistently added to the context.

* feat(organization): add membersLimit param to allow to fetch more or less members than the membership limit

* add test

* Update packages/better-auth/src/plugins/organization/adapter.ts

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

---------

Co-authored-by: Gagan G <80091397+gaganref@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-07-26 00:35:37 -07:00
KinfeMichael TarikuandBereket Engida 7f508f0d22 fix: resolve notion oauth user info extraction (#3567) 2025-07-26 00:35:37 -07:00
Bereket EngidaandBereket Engida 09ef0110a9 chore: release v1.3.4-beta.1 2025-07-26 00:35:37 -07:00
MaxwellandBereket Engida a83cf9847b feat(organization): additional fields support separate client-server projects (#3564) 2025-07-26 00:35:37 -07:00
a9c190898d fix: use same expires at date for cookie session data payload and signature (#3283)
* fix: use same expires at date for cookie session data payload and signature

* chore: lint

---------

Co-authored-by: ping-maxwell <maxwell.multinite@gmail.com>
2025-07-26 00:19:42 -07:00
Bereket EngidaandGitHub c2fb1aa316 fix(stripe): prevent duplicate trials when switching plans (#3622)
* fix(stripe): tiral subscription should use update flow

* add changelog

* chore: changeset
2025-07-25 20:53:03 -07:00
ac6baba2a0 chore: add changesets (#3557)
* chore: consistent package names

* chore: init changesets

* chore: update contribution doc to include generating a changeset

* chore: configure all better auth packages to always have the same version number

* chore: update nextjs demo package name

* chore(changesets): ignore all private packages

* chore(changesets): check for changesets in CI

* chore(changesets): install chagesets cli

* chore(changesets): use orgin as main

* chore(changesets): fix typo

* chore(changesets): check for changes since main in ci

* chore(changesets): check for changes since main in ci with the correct command

* chore(changesets): check against `origin/main`

* chore(changesets): checking for changesets should be the last action

* chore(changesets): run changelog check after stoping the docker containers

* chore(changesets): run changelog check after building

* chore(changesets): run changelog check after starting docker compose

* chore(changesets): run changelog check after linting

* chore(changesets): run changelog check after testing

* Revert "chore(changesets): run changelog check after testing"

This reverts commit 6dc000f78d.

* chore: export siwe in better-auth/plugins (#3596)

The docs were using this import path, yet `siwe` wasn't exported there. This PR fixes this.

* chore: fix cookies test

* docs: make client-side vs. server-side explicit (#3603)

* docs: fix broken link to ERC-4361 in siwe docs (#3604)

* fix(jwt): ensure alg is added to the jwks when generating via /token endpoint (#3601)

* fix: Ensure alg is added to the jwks when generating via /token endpoint

* chore: resolve linting issues

* chore(example): fix SvelteKit example (#1742)

* refactor: upgrade Svelte, Vite and related packages

* refactor: replace no longer supported `body.callbackURL` with `onSuccess`

* fix: add missing `svelte-kit sync` on `prepare`

* fix: add missing `import`s

* chore(svelte-kit-example): show message & redirect to index after sign up

* chore: add npm script to migrate database

* doc: add more commands to set up

* chore: explicitly disable verification email on sign up

The example does not work if you set `sendOnSignUp: true` without setting up the email server.

* refactor(svelte-kit-example): add type for hooks

* chore(svelte-kit-example): redirect to sign in page if users open dashboard without log in

* chore: diable some rules for svelte-kit-example due to Biome's limited Svelte support

* style: fix format

* chore: update pnpm-lock.yaml

* chore: fix lock file

---------

Co-authored-by: Bereket Engida <Bekacru@gmail.com>

* fix: make sveltekit plugin ALS-agnostic (#3533)

* svelte cookie

* udpate

* update

* update

* update

* chore(cli): update zod to v4 (#3618)

* fix: correct typo in freeTrial variable name in Stripe integration

* chore: fix lock file

* chore: add changeset for typo fix in freeTrial

---------

Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
Co-authored-by: Bereket Engida <Bekacru@gmail.com>
Co-authored-by: Justin <127172022+jl33-ai@users.noreply.github.com>
Co-authored-by: Elliott Minns <elliott.minns@pm.me>
Co-authored-by: Jumpei Ogawa <git@phanective.org>
Co-authored-by: KinfeMichael Tariku <65047246+Kinfe123@users.noreply.github.com>
2025-07-25 20:39:44 -07:00
KinfeMichael TarikuandGitHub aba8f7f04d chore(cli): update zod to v4 (#3618) 2025-07-25 16:59:06 -07:00
KinfeMichael TarikuandGitHub b5a4c3fc78 fix: make sveltekit plugin ALS-agnostic (#3533)
* svelte cookie

* udpate

* update

* update

* update
2025-07-25 15:07:28 -07:00
Elliott MinnsandGitHub f99305b29e fix(jwt): ensure alg is added to the jwks when generating via /token endpoint (#3601)
* fix: Ensure alg is added to the jwks when generating via /token endpoint

* chore: resolve linting issues
2025-07-24 23:28:11 -07:00
Bereket Engida 68f09f15d3 chore: fix cookies test 2025-07-24 15:21:47 -07:00
MaxwellandGitHub 59ea6c9d79 chore: export siwe in better-auth/plugins (#3596)
The docs were using this import path, yet `siwe` wasn't exported there. This PR fixes this.
2025-07-24 12:27:54 -07:00
Gagan GandGitHub 01814c55e0 fix: ensure session is added to context when reading from cookie cache (#3578)
When session data is present in the cookie, `get-session` was
early-returning without adding the session to the context, causing hooks
to receive a null session.
This change ensures the session is consistently added to the context.
2025-07-23 22:07:30 -07:00
Bereket EngidaandGitHub 4d7676d8d9 fix: shouldn't refresh a token if access token expires is undefined or null (#3577) 2025-07-23 21:46:02 -07:00
Khiet Tam NguyenandGitHub e11c51e210 feat(cli): added --yes for generate/migrate, deprecated --y (#3542)
* feat(cli): added --yes option, deprecated --y, as per #1937

* feat:(cli): add deprecation warning to console if --y is used

* style(cli): linted migrate.ts & generate.ts

* docs(cli): revert 1.0 changelog
2025-07-23 09:31:06 -07:00
Bereket Engida 602ab7c4c6 chore: release v1.3.3 2025-07-22 23:02:47 -07:00
Bereket EngidaGitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
a1cdb8b115 fix(organization): list organization teams should prioritize query param team id(#3531)
* fix: list organization teams

* Update packages/better-auth/src/plugins/organization/routes/crud-team.ts

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

* add request check

* fix list team members

* add desc

* fix: fetch session

* update

* only allow fetching using userid when request doesn't exist

* requrie session

* remove org id

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-07-22 23:02:31 -07:00