Commit Graph
57 Commits
Author SHA1 Message Date
CalandAlex Yang 133a2b27af fix(anonymous): export types (#7661)
Co-authored-by: Alex Yang <himself65@outlook.com>
2026-01-28 17:06:03 -08:00
Alex Yang 1ba5a3fd5a fix(rate-limit): support IPv6 address normalization and subnet (#7470) 2026-01-19 22:40:42 -08:00
dependabot[bot]Alex Yangdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
557a74c2df chore(deps): bump hono from 4.11.3 to 4.11.4 (#7343)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 19:20:18 -08:00
3f06dd2ddd feat: support form data for email sign-in/sign-up and fallback to checking fetch Metadata for first login (#6314)
Co-authored-by: Taesu <166604494+bytaesu@users.noreply.github.com>
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
Co-authored-by: Jonathan Samines <jn.samines@gmail.com>
2025-12-31 21:36:19 +08:00
Dylan Vanmaliandgithub-actions[bot] f1b90e4085 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 19:16:54 +00:00
Alex Yangandgithub-actions[bot] 4551e095a1 fix: export necessary adapter types (#6903) 2025-12-20 08:33:28 +00:00
7a26d7e414 test: ensure no unexpected output for cloudflare worker (#6704)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-14 05:47:14 +00:00
Alex Yangandgithub-actions[bot] f9270eddd8 chore: bump devDependencies (#6562) 2025-12-06 09:44:36 +00:00
Maxwellandgithub-actions[bot] 51e467cee3 fix(oidc): compatibility with exact-optional-property (#6502) 2025-12-04 04:52:42 +00:00
Jonathan SaminesandGitHub fbe51c8f93 chore: add spell checker (#6319) 2025-12-01 10:33:38 -08:00
Alex YangandGitHub 2edee431cc chore(deps): update dependencies in package.json and pnpm-workspace.yaml (#6255) 2025-11-24 09:26:58 -08:00
Stephen ZhouandGitHub 0c6787506d chore: fix package depends on itself (#6189) 2025-11-22 07:49:07 -08:00
Taisei MimaandGitHub c4579f4745 chore(deps): bump stripe v20 (#6162) 2025-11-21 16:48:04 +00:00
Jonathan SaminesandGitHub 57ee11a26f chore(lint): enforce consistent import type style (#6044) 2025-11-17 21:11:39 +00:00
Alex YangandGitHub 6c9fe209e2 chore: bump vitest (#6012) 2025-11-15 23:28:56 +00:00
Alex YangandGitHub 0f7580366c pref: infinite tsc compilation time (#5893) 2025-11-11 01:21:03 +00:00
Alex Yang 34cf292058 chore: remove e2e smoke for cloudflare 2025-11-10 16:03:45 -08:00
Alex YangandGitHub 3a2dcd4c83 chore(e2e): type fix (#5845) 2025-11-08 01:53:41 +00:00
Alex YangandGitHub 7caa2752ed feat(client): add type helper AuthClient (#5815) 2025-11-07 05:07:17 +00:00
TaesuandGitHub f327e336c8 refactor: split the passkey plugin into a separate package (#5769) 2025-11-05 17:05:39 +00:00
Alex YangandGitHub 7b65ddd02c test: add type test for organization plugin (#5581) 2025-10-29 21:41:10 +00:00
Alex YangandGitHub 15bc3c9b10 chore(organization): fix client side import server side code (#5631) 2025-10-28 01:40:19 +00:00
Alex YangandGitHub 938c2a7c31 chore: lint enable organize import (#5556) 2025-10-24 19:05:09 +00:00
Alex YangandGitHub d958d1cf58 test: username type infer (#5434) 2025-10-20 19:42:51 +00:00
ocavueandGitHub 2dfc12e61f test: check typecheck test status (#5421) 2025-10-20 16:03:56 +00:00
Alex YangGitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
4b5f637bf0 fix(organization): typecheck node exceeds the maximum length (#5372)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-10-17 03:08:55 +00:00
Alex YangandGitHub a31bbafb34 test: add type check cases (#5367) 2025-10-16 21:47:39 +00:00
Alex YangandGitHub 5561ba75a5 chore: bump better-call (#5348) 2025-10-16 10:48:17 +00:00
Alex YangandGitHub b4a7ea6296 fix(organization): compatibility with exactOptionalPropertyTypes (#5337) 2025-10-15 23:46:03 +00:00
19f5c1409f fix(organization): compatibility with declaration on tsconfig.json (#5334)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-15 20:08:26 +00:00
Alex YangandGitHub af03d5fc69 fix(username): compacity with exactOptionalPropertyTypes (#5313) 2025-10-15 00:11:08 +00:00
Alex YangandGitHub 2e62296432 e2e: add coverage for additional fields (#5286) 2025-10-13 23:17:34 +00:00
f27231cf8d fix: type compatibility with exactOptionalPropertyTypes (#5236)
Co-authored-by: Alex Yang <himself65@outlook.com>
2025-10-13 21:36:38 +00:00
Alex YangandGitHub 5c878f5c83 chore: update fixture package name (#5281) 2025-10-13 19:05:39 +00:00
Alex YangandGitHub fe01f5ef11 chore: use tsdown as bundler (#5249) 2025-10-13 17:35:33 +00:00
Alex YangandGitHub 3e013eea62 test: add bundle entry for server code (#5199) 2025-10-10 00:43:11 +00:00
Alex YangandGitHub e6d82a83fe test: add assertions to check for unwanted imports in built output (#5123) 2025-10-06 09:32:36 -07:00
Bereket EngidaandAlex Yang 9818fb85ec chore: misc update 2025-09-29 18:02:21 -07:00
Alex YangandGitHub f191291eac e2e: add postgres-js migration test (#4867) 2025-09-24 21:15:40 +00:00
Alex YangandGitHub cd84ef5c8b e2e: add vite client build (#4643) 2025-09-23 23:07:50 +00:00
Alex YangandGitHub dda554553e fix(api-key): calling client on server side (#4777) 2025-09-19 22:54:11 +00:00
Alex YangandGitHub 6ea2357653 chore: bump dev deps (#4678) 2025-09-15 19:34:59 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
7537dbb074 chore(deps): bump hono from 4.9.6 to 4.9.7 (#4619)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-12 23:13:50 +00:00
Alex Yang 22b78cfe72 Revert "feat: support cross-domain cookie (#4482)"
This reverts commit 61b6a87435.
2025-09-12 00:34:01 -07:00
61b6a87435 feat: support cross-domain cookie (#4482)
Co-authored-by: Alex Yang <himself65@outlook.com>
Co-authored-by: Rikhi Singh <114336052+rikhisingh@users.noreply.github.com>
2025-09-09 17:09:24 -07:00
Alex YangandGitHub a22f65fdc3 chore: bump version (#4535) 2025-09-08 18:30:44 -07:00
Alex YangGitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
6353e3da02 e2e: integration test for solid-js (#4469)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-09-08 16:49:01 -07:00
Alex YangandGitHub 14ad4347c0 fix: cloudflare build warning with node:sqlite (#4415) 2025-09-03 19:15:24 -07:00
Alex YangandGitHub efdb4ce4f0 chore: enable noFloatingPromises lint rule (#3842) 2025-09-03 15:02:45 -07:00
Alex YangandGitHub 561265f66b e2e: move server into playwright (#4397) 2025-09-03 14:39:45 -07:00