45 KiB
@better-auth/electron
1.7.10
1.7.9
1.7.8
Patch Changes
- #11512
4175b34Thanks @bytaesu! - Align the installed@better-auth/utilsversion withbetter-callwhile accepting^0.4.2 || ^0.5.0across official package peers.
1.7.7
1.7.6
1.7.5
1.7.4
1.7.3
1.7.2
1.7.1
1.7.0
Minor Changes
-
#9645
e014029Thanks @ping-maxwell! - Harden the Electron OAuth flow and tighten custom-scheme trusted-origin matching.The Electron sign-in flow now mandates PKCE S256. Plain PKCE is rejected: the
code_challenge_methodparameter is gone and every authorization code is verified by hashing the verifier with SHA-256. The server no longer trusts anelectron-originheader to set the request Origin. The Electron client now sends a realOrigin(for examplemyapp:/), so upgrade the@better-auth/electronclient and server together and make sure your app's scheme is intrustedOrigins. The unuseddisableOriginOverrideoption is removed.Custom-scheme entries in
trustedOriginsnow match by scheme and authority instead of string prefix. A host-less entry such asmyapp://orexp://still trusts every host of that scheme, but a host-bearing entry such asmyapp://callbackmatches that host exactly, so it is no longer satisfied bymyapp://callback.attacker.tld. -
#9069
c7d2253Thanks @gustavovalverde! - Rewrite the generic OAuth plugin as a first-class social provider with OAuth 2.1 security defaults. Providers now usesignIn.social+callback/:idinstead of dedicated plugin endpoints, with PKCE required by default (OAuth 2.1), RFC 9207 issuer validation, OIDC auto-discovery withopenidscope injection, and typed provider IDs.Breaking changes:
signIn.oauth2({ providerId })replaced bysignIn.social({ provider })oauth2.link()replaced bylinkSocial()- Callback URL changed from
/api/auth/oauth2/callback/:idto/api/auth/callback/:id genericOAuthClient()removed; generic OAuth providers now use the standard social client APIspkcedefaults totrue(wasfalse); setpkce: falsefor providers that reject PKCEauthorizationUrlParamsandtokenUrlParamsonly acceptRecord<string, string>issuerandrequireIssuerValidationconfig fields removed; issuer validation is automatic via OIDC discoverymapProfileToUserprofile typed asOAuth2UserInfo & Record<string, unknown>
Patch Changes
- #10505
d701f90Thanks @gustavovalverde! - One Tap, Electron, and Expo client plugins now compose withcreateAuthClientwithout TypeScript errors, and the resulting client preserves each plugin's inferred actions.
1.7.0-rc.6
Patch Changes
- #10794
2ad2928Thanks @bytaesu! - Restore client plugin declaration compatibility for downstream TypeScript consumers.
1.7.0-rc.5
1.7.0-rc.4
1.7.0-rc.3
Patch Changes
- #10505
d701f90Thanks @gustavovalverde! - One Tap, Electron, and Expo client plugins now compose withcreateAuthClientwithout TypeScript errors, and the resulting client preserves each plugin's inferred actions.
1.7.0-rc.2
1.7.0-rc.1
1.7.0-rc.0
1.7.0-beta.10
1.7.0-beta.9
Patch Changes
- Updated dependencies []:
- better-auth@1.7.0-beta.9
- @better-auth/core@1.7.0-beta.9
1.7.0-beta.8
Patch Changes
- Updated dependencies [
7c7313c,06daf70,a83152e,97903c9,3a79aff]:- better-auth@1.7.0-beta.8
- @better-auth/core@1.7.0-beta.8
1.7.0-beta.7
Patch Changes
1.7.0-beta.6
Patch Changes
- Updated dependencies [
b36c38f,73541c1,bf39cbf,e53582c,aedcb97,2196ea6,d2a79ba,34558bc,652fa53,6fe9faa,ad35ead]:- better-auth@1.7.0-beta.6
- @better-auth/core@1.7.0-beta.6
1.7.0-beta.5
Minor Changes
-
#9645
e014029Thanks @ping-maxwell! - Harden the Electron OAuth flow and tighten custom-scheme trusted-origin matching.The Electron sign-in flow now mandates PKCE S256. Plain PKCE is rejected: the
code_challenge_methodparameter is gone and every authorization code is verified by hashing the verifier with SHA-256. The server no longer trusts anelectron-originheader to set the request Origin. The Electron client now sends a realOrigin(for examplemyapp:/), so upgrade the@better-auth/electronclient and server together and make sure your app's scheme is intrustedOrigins. The unuseddisableOriginOverrideoption is removed.Custom-scheme entries in
trustedOriginsnow match by scheme and authority instead of string prefix. A host-less entry such asmyapp://orexp://still trusts every host of that scheme, but a host-bearing entry such asmyapp://callbackmatches that host exactly, so it is no longer satisfied bymyapp://callback.attacker.tld.
Patch Changes
- Updated dependencies [
0cbaf81,e014029,ec8a38c,7fe0e2b,4f53b61,e0d2b9e,91f235f,76a3342,41cca60]:- better-auth@1.7.0-beta.5
- @better-auth/core@1.7.0-beta.5
1.7.0-beta.4
1.6.30
Patch Changes
- Updated dependencies [
07c1718]:- @better-auth/core@1.6.30
- better-auth@1.6.30
1.6.29
Patch Changes
- Updated dependencies [
e6e1b4e]:- better-auth@1.6.29
- @better-auth/core@1.6.29
1.6.28
Patch Changes
-
#10794
2ad2928Thanks @bytaesu! - Restore client plugin declaration compatibility for downstream TypeScript consumers. -
Updated dependencies [
773de54,2ad2928]:- better-auth@1.6.28
- @better-auth/core@1.6.28
1.6.27
Patch Changes
1.6.26
Patch Changes
- Updated dependencies [
9ede805,5a811f1,d8327f1,e2c73fb,af50c45,701cd43,a30e274,e7b0eba,2b4a14f,7552a3b,ea38fca,a03e4c1]:- better-auth@1.6.26
- @better-auth/core@1.6.26
1.6.25
Patch Changes
1.6.24
Patch Changes
-
#10440
67cff3eThanks @ping-maxwell! - Bump tested Electron to 43.x in@better-auth/electronand the demo app. Peer range stays>=36.0.0. -
#9672
d7c41baThanks @swithek! -/electron/init-oauth-proxynow forwards each Set-Cookie from the inner sign-in response separately. The previousHeaders.get("set-cookie")returned them as one comma-joined string, so the browser silently dropped the transfer-token cookie that the desktop deep-link handoff needs. -
Updated dependencies [
03dc5a0,7508940,bae7198,ef4d273,6758231,99dbdd7,086ca91,8f2dedd,4e685ee,3bf0e49,f59a0ee,54fab08,0f2cc1b,ae78109,46d2bf0,29a373e,f6d18fa,f23ce50,c4d1dda]:- better-auth@1.6.24
- @better-auth/core@1.6.24
1.6.23
Patch Changes
- Updated dependencies [
8581f97]:- better-auth@1.6.23
- @better-auth/core@1.6.23
1.6.22
Patch Changes
1.6.21
Patch Changes
- Updated dependencies [
e0762a1,882cf9e,f52e1ab,90d509e,b5bec19,816d7f9,239bcc8,1bc370a,570267c,461ca6f,88409b0,5953157,b046f9e,ae647b4]:- better-auth@1.6.21
- @better-auth/core@1.6.21
1.6.20
Patch Changes
1.6.19
Patch Changes
- Updated dependencies [
de4aa52,b4b0266,5bd5e1c,581f827,8407885,c1a8a64,635f190,a787e0b,c2f718f,7d18175]:- better-auth@1.6.19
- @better-auth/core@1.6.19
1.6.18
Patch Changes
1.6.17
Patch Changes
-
#9993
baeaa00Thanks @gustavovalverde! - An Electron authorization code can no longer be exchanged for a session more than once when the exchange is attempted concurrently. -
Updated dependencies [
baeaa00,3e99e6c,96c78c3,baeaa00,baeaa00,0c3856f,baeaa00,baeaa00,ed7b6c9,e0a768c,7343284,0c3856f,baeaa00,baeaa00,7343284,7343284,0c3856f,fdef997,0c3856f,d9c526b,0c3856f,fdef997,baeaa00,baeaa00,baeaa00,baeaa00,fdef997,7343284,baeaa00,8960f5f,baeaa00,5c289b5,1dbf5bb,baeaa00,baeaa00,59e0ccb,b803c61,fdef997]:- better-auth@1.6.17
- @better-auth/core@1.6.17
1.6.16
Patch Changes
-
#9974
cb1cbfaThanks @Bekacru! - Require S256 PKCE for Electron auth transfers. The transfer flow previously defaulted a missingcode_challenge_methodtoplainand the token exchange fell back to a plain string comparison for any non-s256method. Inplainmode the verifier equals the challenge, which already appears in the sign-in URL query, so the comparison did not add a meaningful check. Missing, unknown, andplainmethods are now rejected at minting (handleTransfer,/electron/transfer-user,/electron/init-oauth-proxy) and at exchange (/electron/token). The official Electron client already uses S256, so existing flows are unaffected. -
Updated dependencies [
cb1cbfa,cb1cbfa,cb1cbfa,cb1cbfa,cb1cbfa,cb1cbfa,87e7aa5,cb1cbfa,cb1cbfa,cb1cbfa,893cf6c,cb1cbfa,cb1cbfa,5e49c56,cb1cbfa]:- better-auth@1.6.16
- @better-auth/core@1.6.16
1.6.15
Patch Changes
- Updated dependencies [
1012b69,ad60333,0933c05,b0ddfd3]:- better-auth@1.6.15
- @better-auth/core@1.6.15
1.6.14
Patch Changes
- Updated dependencies [
2d9781a,5a2d642,13abc79,9d3450a]:- better-auth@1.6.14
- @better-auth/core@1.6.14
1.6.13
Patch Changes
- Updated dependencies [
e7eb45b,03e6c94,1e5b808,13abc79]:- better-auth@1.7.0-beta.4
- @better-auth/core@1.7.0-beta.4
1.7.0-beta.3
Patch Changes
- Updated dependencies [
4e8e4c7,523f95c,729c00d]:- better-auth@1.7.0-beta.3
- @better-auth/core@1.7.0-beta.3
1.7.0-beta.2
Patch Changes
- Updated dependencies [
9aed910,acbd6ef,954b664,39d6af2]:- better-auth@1.7.0-beta.2
- @better-auth/core@1.7.0-beta.2
1.7.0-beta.1
Minor Changes
-
#9069
c7d2253Thanks @gustavovalverde! - Rewrite the generic OAuth plugin as a first-class social provider with OAuth 2.1 security defaults. Providers now usesignIn.social+callback/:idinstead of dedicated plugin endpoints, with PKCE required by default (OAuth 2.1), RFC 9207 issuer validation, OIDC auto-discovery withopenidscope injection, and typed provider IDs.Breaking changes:
signIn.oauth2({ providerId })replaced bysignIn.social({ provider })oauth2.link()replaced bylinkSocial()- Callback URL changed from
/api/auth/oauth2/callback/:idto/api/auth/callback/:id genericOAuthClient()removed; generic OAuth providers now use the standard social client APIspkcedefaults totrue(wasfalse); setpkce: falsefor providers that reject PKCEauthorizationUrlParamsandtokenUrlParamsonly acceptRecord<string, string>issuerandrequireIssuerValidationconfig fields removed; issuer validation is automatic via OIDC discoverymapProfileToUserprofile typed asOAuth2UserInfo & Record<string, unknown>
Patch Changes
- Updated dependencies [
5142e9c,484ce6a,f875897,c7d2253,9a6d475,513dabb,6f2948e]:- better-auth@1.7.0-beta.1
- @better-auth/core@1.7.0-beta.1
1.7.0-beta.0
Patch Changes
- Updated dependencies [
6ce30cf,f6428d0,c5066fe,5f84335,93d3871,544f1c6]:- better-auth@1.7.0-beta.0
- @better-auth/core@1.7.0-beta.0
1.6.10
Patch Changes
- Updated dependencies [
1e0f26d,8c1e917,b2d655c,09f1327,906b7b3,e9c978e,e71aad3,80a655d,15ff28a,88a7c67,9a7b51d,1b25902,cf59136,a597ee0,fc02ced,9f1ef1f,36ef808,c1336c5,3a9a2c3,fde0432,2220a6d]:- better-auth@1.6.10
- @better-auth/core@1.6.10
1.6.9
Patch Changes
- Updated dependencies [
815ecf6]:- @better-auth/core@1.6.9
- better-auth@1.6.9
1.6.8
Patch Changes
1.6.7
Patch Changes
- Updated dependencies [
307196a,4a180f0,4f373ee,e1b1cfc,d053a45]:- better-auth@1.6.7
- @better-auth/core@1.6.7
1.6.6
Patch Changes
-
#9226
e64ff72Thanks @gustavovalverde! - Consolidate host/IP classification behind@better-auth/core/utils/hostand close several loopback/SSRF bypasses that the previous per-package regex checks missed.Electron user-image proxy: SSRF bypasses closed (
@better-auth/electron).fetchUserImagepreviously gated outbound requests with a bespoke IPv4/IPv6 regex that missed multiple vectors. All of the following were reachable in production and are now blocked:http://tenant.localhost/and other*.localhostnames (RFC 6761 reserves the entire TLD for loopback).http://[::ffff:169.254.169.254]/(IPv4-mapped IPv6 to AWS IMDS, the classic SSRF bypass).http://metadata.google.internal/,http://metadata.goog/(GCP instance metadata).http://instance-data/,http://instance-data.ec2.internal/(AWS IMDS alternate FQDNs).http://100.100.100.200/(Alibaba Cloud IMDS; lives in RFC 6598 shared address space100.64/10, which the old regex did not cover).http://0.0.0.0:PORT/(the Linux/macOS kernel routes the unspecified address to loopback: Oligo's "0.0.0.0 Day").http://[fc00::...]/,http://[fd00::...]/(IPv6 ULA per RFC 4193) and IPv6 link-localfe80::/10, neither of which the regex recognized.
Documentation ranges (RFC 5737 / RFC 3849), benchmarking (
198.18/15), multicast, and broadcast are also now rejected.better-auth:0.0.0.0is no longer treated as loopback. The previousisLoopbackHostimplementation inpackages/better-auth/src/utils/url.tsclassified0.0.0.0alongside127.0.0.1/::1/localhost.0.0.0.0is the unspecified address, not loopback; treating it as such lets browser-origin requests reach localhost-bound dev services (Oligo's "0.0.0.0 Day"). The helper now accepts the full127.0.0.0/8range and any*.localhostname, and rejects0.0.0.0.better-auth: trusted-origin substring hardening.getTrustedOriginspreviously usedhost.includes("localhost") || host.includes("127.0.0.1")when deciding whether to add anhttp://variant for a dynamicbaseURL.allowedHostsentry. Misconfigurations likeevil-localhost.comor127.0.0.1.nip.iowould incorrectly gain an HTTP origin in the trust list. The check now uses the shared classifier, so only real loopback hosts get the HTTP variant.@better-auth/oauth-provider: RFC 8252 compliance.- §7.3 redirect URI matching now accepts the full
127.0.0.0/8range (not just127.0.0.1) plus[::1], with port-flexible comparison. Port-flexible matching is limited to IP literals; DNS names such aslocalhostcontinue to use exact-string matching per §8.3 ("NOT RECOMMENDED" for loopback). validateIssuerUrluses the shared loopback check rather than a two-hostname literal comparison.
New module:
@better-auth/core/utils/host. ExposesclassifyHost,isLoopbackIP,isLoopbackHost, andisPublicRoutableHost. One RFC 6890 / RFC 6761 / RFC 8252 implementation that handles IPv4, IPv6 (including bracketed literals, zone IDs, IPv4-mapped addresses, and 6to4 / NAT64 / Teredo tunnel forms with embedded-IPv4 recursion), and FQDNs, with a curated cloud-metadata FQDN set. All bespoke loopback/private/link-local checks across the monorepo now route through it. -
Updated dependencies [
b5742f9,4debfb6,9ea7eb1,a844c7d,ab4c10f,a61083e,e64ff72]:- @better-auth/core@1.6.6
- better-auth@1.6.6
1.6.5
Patch Changes
1.6.4
Patch Changes
1.6.3
Patch Changes
- Updated dependencies [
5142e9c,484ce6a,f875897,6ce30cf,f6428d0,9a6d475,513dabb,c5066fe,5f84335]:- better-auth@1.6.3
- @better-auth/core@1.6.3
1.6.2
Patch Changes
- Updated dependencies [
9deb793,2cbcb9b,b20fa42,608d8c3,8409843,e78a7b1]:- better-auth@1.6.2
- @better-auth/core@1.6.2
1.6.1
Patch Changes
1.6.0
Minor Changes
- #8836
5dd9e44Thanks @gustavovalverde! - Add optional version field to the plugin interface and expose version from all built-in plugins
Patch Changes
- Updated dependencies [
dd537cb,bd9bd58,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,469eee6,560230f]:- better-auth@1.6.0
- @better-auth/core@1.6.0
1.6.0-beta.0
Minor Changes
28b1291Thanks @gustavovalverde! - Add optional version field to the plugin interface and expose version from all built-in plugins