Commit Graph

225 Commits

Author SHA1 Message Date
Bereket Engida
d587f5b604 chore: enable subdomain cookies 2025-07-27 20:29:38 -07:00
Bereket Engida
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
Fraol Lemecha
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 6dc000f78d30fa3622e37fc0d8699cc99ed868b6.

* 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
Maxwell
1ed38cd28b feat(docs): APIMethod, documents all server & client auth examples (#2577) 2025-07-17 16:20:10 -07:00
Fraol Lemecha
0a8c8d2bf4 chore(demo): add links to features list (#3392) 2025-07-15 09:32:45 -07:00
Bereket Engida
ebde893b1c fix(user-card): refactor email verification button and update trusted origins 2025-06-27 11:22:43 -07:00
Bereket Engida
7c728248dc fix: delete user should respect freshAge config (#3075)
* fix: delete user needs to enforced through fresh age

* cleanup

* cleanup
2025-06-18 21:20:52 -07:00
KinfeMichael Tariku
3348ae0e81 chore: fix demo build (#2995)
* fix: otp value and tries separator

* fix demo

* clean up
2025-06-12 22:18:14 -07:00
Bereket Engida
b253130d5e chore: change sign-in box footer to built-with 2025-06-12 21:57:01 -07:00
Seth Weinheimer
3f25944726 docs: update options for oauth2 registration option (#2992) 2025-06-11 14:59:47 -07:00
Bereket Engida
eaf80cf945 fix: rename forgetPassword APIs to requestPasswordReset (#2947)
* fix: rename  to

* Update demo/nextjs/app/(auth)/forget-password/page.tsx

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>
2025-06-07 16:28:47 -07:00
Bereket Engida
158581d7da chore: remove mcp impl from demo 2025-06-01 10:20:32 -07:00
Bereket Engida
fd727e515d chore: update kysley to 0.28.2 2025-05-31 09:14:05 -07:00
KinfeMichael Tariku
9e0749ab2a fix(demo): avoid page refresh on session termination (#2850) 2025-05-31 01:00:06 -07:00
KinfeMichael Tariku
06ca627a6a fix: demo build & upgrades (#2848) 2025-05-31 00:22:02 -07:00
Bereket Engida
9cc2e3d8ab feat: MCP plugin (#2666)
* chore: wip

* wip

* feat: mcp plugin

* wip

* chore: fix lock file

* clean up

* schema

* docs

* chore: lint

* chore: release v1.2.9-beta.1

* blog

* chore: lint
2025-05-23 12:44:51 -07:00
Anthony DePasquale
fc4c0eb280 Better Auth 2025-04-13 14:11:08 +02:00
Anthony DePasquale
b36a1b83c8 GitHub 2025-04-13 14:11:08 +02:00
ririxi
cb900f9594 feat(organization): support multiple permissions check (#2227)
* feat: remove the artificial resource limit so that code can check

Also change `permission` to `permissions` (clearer for end user). `permission` is left for backwards compatibility.

* docs: add examples for multiple perms checking

* refactor: check `permissions` first, then legacy one

* feat: use union types for `permission` & `permissions`

* fix: properly use union types

* fix: remove accidental `@deprecated` comment

* chore: lint

* fix test

* chore: add oneTimeToken plugin to client barrel exports (#2224)

* docs(expo): add id token usage

* feat(oauth2): override user info on provider sign-in (#2148)

* feat(oauth2): override user info on provider sign-in

* improve email verification handling

* resolve mrge

* fix(sso): update overrideUserInfo handling to use provider configuration

* fix param

* chore: change plugin interface middleware type (#2195)

* fix: delete from session table when stopImpersonate called (#2230)

* chore: fix active organization inferred type

* chore: fix admin test

---------

Co-authored-by: Bereket Engida <bekacru@gmail.com>
Co-authored-by: Wade Fletcher <3798059+wadefletch@users.noreply.github.com>
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
Co-authored-by: KinfeMichael Tariku <65047246+Kinfe123@users.noreply.github.com>
2025-04-12 22:00:58 +03:00
dependabot[bot]
128cca8151 chore(deps): bump next from 15.2.1 to 15.2.3 (#1982)
Bumps [next](https://github.com/vercel/next.js) from 15.2.1 to 15.2.3.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.2.1...v15.2.3)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-26 19:33:05 +03:00
KinfeMichael Tariku
918b22906e chore(demo): add readme (#2004) 2025-03-26 09:49:43 +03:00
Brian Cooper
6b8da0e0f7 chore(demo): remove extra = from env (#1851) 2025-03-17 19:03:27 +03:00
Bereket Engida
58889fece5 chore: update dependencies and lock file 2025-03-09 14:04:47 +03:00
Bereket Engida
b5f638ca45 docs: upgrade to tailwind v4, react 19, fuma docs 15 (#1735) 2025-03-08 19:33:31 +03:00
Bereket Engida
dd0cc21a6a chore: upgrade Shiki to v1.29.2 and update documentation 2025-03-05 00:06:02 +03:00
Bereket Engida
68c108ca85 demo(refactor): remove unnecessary ref props 2025-03-04 20:55:46 +03:00
Bereket Engida
9d8bbb7471 chore: lint 2025-03-04 20:31:58 +03:00
Bereket Engida
210c20eb65 refactor: migrate UI components to React 19 2025-03-04 20:29:25 +03:00
Bereket Engida
232f565cb7 chore: update React and TypeScript type definitions to version 19 2025-03-04 19:43:45 +03:00
Bereket Engida
b4583dd4cd chore: upgrade React and Next.js to latest versions 2025-03-04 19:42:41 +03:00
Bereket Engida
c1216a988d demo: add impersonation stop button and admin user configuration 2025-03-04 14:33:04 +03:00
Bereket Engida
0194b50e23 refactor(demo): change database configuration 2025-03-04 10:12:56 +03:00
Bereket Engida
23e3ce296b demo: use the default BA sign-in/sign-up components 2025-03-04 10:06:15 +03:00
Bereket Engida
16f082c014 demo: remove empty string as a fallback img src 2025-03-04 08:43:36 +03:00
Bereket Engida
2704f22dee fix(stripe): cancel should properly apply for immediate trail cancels 2025-03-03 19:44:53 +03:00
Bereket Engida
07d32ac479 chore: update demo .env.example 2025-03-03 11:31:35 +03:00
Bereket Engida
4ec68150d7 chore: lint 2025-03-03 11:18:10 +03:00
Bereket Engida
ed2c7ab84b chore: fix docs highlighting 2025-03-02 21:00:35 +03:00
Bereket Engida
dab0c80384 docs: remove unused schema from stripe docs 2025-03-02 15:16:28 +03:00
Bereket Engida
a3c5ac8233 demo: use turso by default 2025-03-02 13:37:32 +03:00
Bereket Engida
1c16655aba fix(stripe): update subscription webhook handling should use customer id as a fallback 2025-03-02 13:36:51 +03:00
Bereket Engida
1c91294e23 fix(stripe): improve subscription cancellation handling and add callback endpoint 2025-03-02 11:40:01 +03:00
Bereket Engida
2b768c9df7 demo: fix type errors 2025-03-01 02:51:53 +03:00
Bereket Engida
0c7a098e95 fix(organization): improve type inference and session handling 2025-03-01 02:36:52 +03:00
Bereket Engida
86cbf70684 docs: v1.2 release notes (#1602) 2025-03-01 02:22:32 +03:00
Bereket Engida
4f56078e4b feat: stripe plugin to handle subscriptions and customers (#1588)
* init

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* feat(stripe): enable subscription support and update pricing plans

* feat(stripe): add Vitest configuration and initial tests for Stripe integration

* feat(stripe): implement setCookieToHeader function and update tests for customer creation and subscription handling

* feat(stripe): add seats support for subscriptions and update related endpoints

* feat(stripe): update schema to include unique referenceId, stripeSubscriptionId, and periodEnd fields

* wip docs

* docs

* docs: imporves

* fix(stripe): update webhook handlers to use correct subscription identification

* refactor(stripe): simplify customer management by storing Stripe customer ID directly on user

* chore(stripe): update package configuration and build setup

- Migrated from tsup to unbuild for build configuration
- Updated package.json with improved export and dependency management
- Added build configuration for better module support
- Removed tsup configuration file

* chore(stripe): update pnpm lockfile dependencies

- Moved `better-auth` from devDependencies to dependencies
- Added `zod` as a direct dependency
- Reorganized package dependencies in the lockfile

* feat(stripe): enhance subscription management and error handling

- Added toast error handling for subscription upgrades in the dashboard
- Updated Stripe price IDs for different plans
- Improved Stripe plugin documentation with beta warning and team subscription details
- Implemented intermediate redirect for checkout success to handle race conditions
- Added support for fetching and updating subscription status after checkout
- Fixed Next.js cookie handling and build configuration

* chore: update snapshot
2025-03-01 01:20:17 +03:00
Bereket Engida
687913773a chore: improve build configuration and add tsc type generation 2025-02-28 11:14:10 +03:00
Mohamad Malek Alkhodary
20965ff851 docs: fix file import typo (#1592) 2025-02-28 07:27:18 +03:00
Bereket Engida
c50be9d086 chore(deps): update @better-fetch/fetch to v1.1.15 across projects 2025-02-27 18:28:37 +03:00
Bereket Engida
7ba1af2ff9 Merge branch 'main' into v1.2 2025-02-27 14:20:23 +03:00