Commit Graph

112 Commits

Author SHA1 Message Date
Ray
6ce30cf138 fix: incorrect operationId in password reset callback endpoint (#9072)
Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
2026-04-09 20:13:06 +00:00
Joél Solano
7306c5af05 feat(electron): allow manual token exchange & add sanitizeUser option (#7976) 2026-02-16 23:10:02 -08:00
Joél Solano
3d17eaee3f chore(electron) add openapi metadata to routes (#7872) 2026-02-10 01:04:28 +00:00
Joél Solano
1c9aab3bce feat: electron integration (#7647)
Co-authored-by: Alex Yang <himself65@outlook.com>
2026-02-04 20:37:05 +00:00
Bereket Engida
ab5c2e7d64 chore(demo): hide admin dashboard for non-admin users 2026-01-17 22:18:42 -08:00
Jonathan Samines
2a728dbd95 chore(scim): add SCIM demo (#6639)
Co-authored-by: Alex Yang <himself65@outlook.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-13 16:15:24 -08:00
Bereket Engida
3b7b96ee02 demo: improve demo project ui (#7269)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Bereket Engida <Bekacru@users.noreply.github.com>
2026-01-11 14:50:10 -08:00
Taesu
9d882ed5cf chore(demo): redirect to home when current session is removed (#6907) 2025-12-23 11:47:08 +08:00
Dylan Vanmali
686fba4e11 feat(oauth-provider): an oauth 2.1 compliant plugin (#4163)
An upgrade to oidc-provider plugin that makes it oauth2.1 compliant and has a configuration that is secure by default.

Plans for the deprecation of oidc-provider plugin due to many inherent flaws in its design. Internally, plugin functions now share logic, providing for better future extensibility if new code_grants need to be written or user/client jwt or opaque tokens need to be written. Furthermore, as an oAuth 2.1 provider, it provides logic valid for an MCP server. When using the scope "openid" (optional, enabled by default), the server acts like an OpenId server able to issue id tokens and provides a /userinfo endpoint.

Features

OAuth 2.1 by default
Properly supports authorization_code, refresh_token, and client_credentials grants
PKCE by default (removes plain completely)
Public and confidential client registration
JWT plugin is required by default, but can be disabled using disableJWTPlugin flag
Access tokens can now be received in JWT verifiable format using the resource parameter (ie JWT aud field)
Id tokens are still verifiable by JWKS when using JWT Plugin, or clientSecret if disabled. Fixes issue to prevent public clients when disableJWTPlugin: true from obtaining id tokens directly even when they shouldn't be allowed an id token and should use /userinfo instead.
Protects /userinfo with scope check
Separates Refresh Token and Access token on database schema to allow multiple access tokens per refresh and multiple refresh tokens per login session.
oauthAccessToken strictly deals with opaque tokens
Opaque tokens are given only when resource parameter (aka audience) is not provided
Option to Encode and Decode refresh tokens
allowDynamicClientRegistration with allowUnauthenticatedClientRegistration flags
Separation of default expiration times
Proper creation of public and confidential clients
Prevents misconfiguration between .well-known/openid-configuration endpoint and plugin settings
scopeExpirations to assign scopes specific expiration
Custom claims through separated functions: customAccessTokenClaims, customIdTokenClaims, and customUserInfoClaims
Organizational support through activeOrganizationalId on a session such as through the organizational plugin. Attaches to oAuthClient via reference_id.
Rp-initiated logout
Account Selection via prompt=select_account.
Account Creation via prompt=create.
Prompt combinations prompt=select_account+consent and prompt=login+consent

Docs available at https://www.better-auth.com/docs/plugins/oauth-provider (pr: https://github.com/better-auth/better-auth/blob/main/docs/content/docs/plugins/oauth-provider.mdx)
2025-12-22 11:16:42 -08:00
Alex Yang
03ffcc9a7a chore(demo): add loading component for reset-password (#6900)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-20 16:03:35 +08:00
Taesu
b1ca46f560 chore(demo): improve nextjs demo (#6727) 2025-12-19 23:02:12 -08:00
Taesu
0547da36c5 chore(demo): cleanup tailwind.config.ts (#6687) 2025-12-11 15:46:02 +09:00
Jonathan Samines
9233783428 chore: remove unused variables (#6647) 2025-12-09 13:51:35 -08:00
Jonathan Samines
fbe51c8f93 chore: add spell checker (#6319) 2025-12-01 10:33:38 -08:00
Jonathan Samines
57ee11a26f chore(lint): enforce consistent import type style (#6044) 2025-11-17 21:11:39 +00:00
Alex Yang
06dfcd9a65 chore: enable useDateNow lint rule (#5938) 2025-11-12 22:02:41 +00:00
Jeffrey Lind
5d1c18ba13 docs: delete leading and trailing whitespaces in className strings (#5650) 2025-10-28 21:25:08 +00:00
Alex Yang
938c2a7c31 chore: lint enable organize import (#5556) 2025-10-24 19:05:09 +00:00
Taesu
86d07bcf55 docs: standardize term "authentication framework" project-wide (#5511) 2025-10-23 05:43:22 +00:00
Alex Yang
9c1a2719ed chore(demo): migrate to tailwind v4 (#4855) 2025-09-23 21:50:49 +00:00
Joel Solano
60c3225e56 chore(demo): properly pass colors to variables (#4729) 2025-09-17 22:23:04 +00:00
Joel Solano
7a067631dd chore(demo): fix globals.css (#4725) 2025-09-17 19:25:35 +00:00
Alex Yang
b4c07468d0 fix(demo): add loading.tsx (#4353) 2025-09-01 16:08:23 -07:00
Bereket Engida
2db142465e feat: add last login method plugin (#4347) 2025-09-01 13:15:23 -07:00
Alex Yang
70d4dc609a chore: enable lint rule noTsIgnore (#4296) 2025-08-28 15:09:47 -07:00
Alex Yang
55ec22c877 fix: small dx for device login (#4141) 2025-08-21 17:46:11 -07:00
Alex Yang
5ded0904d4 feat: support device authorization (#3811) 2025-08-21 14:59:31 -07:00
KinfeMichael Tariku
f59343da43 docs: unify component implementations for consistency (#3799)
* fix(docs): unify component implementations for consistency

* update
2025-08-06 16:38:50 -07:00
Alex Yang
3ee67fcca0 chore(demo): replace isLoading using useTransition (#3775)
* fix: use `useTransition` for isLoading

* fixup! fix: use `useTransition` for isLoading
2025-08-06 16:38:41 -07:00
Alex Yang
575070f605 chore: bump biome (#3784) 2025-08-04 13:48:54 -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
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
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
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
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
Bereket Engida
b5f638ca45 docs: upgrade to tailwind v4, react 19, fuma docs 15 (#1735) 2025-03-08 19:33:31 +03:00
Bereket Engida
68c108ca85 demo(refactor): remove unnecessary ref props 2025-03-04 20:55:46 +03:00
Bereket Engida
c1216a988d demo: add impersonation stop button and admin user configuration 2025-03-04 14:33:04 +03:00
Bereket Engida
16f082c014 demo: remove empty string as a fallback img src 2025-03-04 08:43:36 +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
0c7a098e95 fix(organization): improve type inference and session handling 2025-03-01 02:36:52 +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
55a3cd3c47 demo: client only auth demo 2025-02-27 10:38:11 +03:00