Repository navigation
Conversation
`better-auth` 1.7.1 is affected by GHSA-965c-763c-88jm (CRITICAL: an OAuth state can be used as a magic link to sign in as another person) and GHSA-r4xp-prcw-77qf (HIGH, OAuth Proxy). Both are fixed in 1.7.7. The app uses Generic OAuth for Okta and SSO, so this moves the app and mobile pins to 1.7.27 and re-locks the family together: core, sso, expo and the adapters. The lockfile also carried three other advisories with a fixed release: - `@modelcontextprotocol/sdk` 1.30.0 → 1.32.0 (GHSA-6qxp-vccf-f47h: an MCP server could choose the authorization server that receives the stored refresh token and client secret; GHSA-f897-62hf-6gxq: HTTP transports did not bound the request body). - `seroval` 1.6.3 → 1.6.11 (GHSA-7rv5-mrxv-xcr9, GHSA-97r2-qh9m-474h). - `lodash-es` 4.18.0 → 4.18.1 (GHSA-f23m-r3pf-42rh), which the root overrides pinned at the vulnerable version. Only versions and the lockfile move; no call site changes. Signed-off-by: ege-arhan <egearhany@gmail.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66a11dc69a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "@better-auth/expo": "1.7.27", | ||
| "@better-auth/sso": "1.7.27", |
There was a problem hiding this comment.
Regenerate the standalone mobile npm lockfile
The native types job in .github/workflows/ci.yml:304-309 installs mobile with npm ci --prefix mobile --ignore-scripts, but mobile/package-lock.json still records all four upgraded Better Auth packages at 1.7.1. The npm ci documentation states that when locked dependencies do not match the manifest, “npm ci will exit with an error, instead of updating the package lock,” so this job cannot reach typechecking. Mobile is explicitly outside the Bun workspaces; regenerate and commit its separate npm lockfile as part of this upgrade.
Useful? React with 👍 / 👎.
| "@better-auth/core": "1.7.1", | ||
| "@better-auth/expo": "1.7.1", | ||
| "@better-auth/sso": "1.7.1", | ||
| "@better-auth/core": "1.7.27", |
There was a problem hiding this comment.
Align the mobile fetch pin with the upgraded auth peers
For the standalone mobile npm install, the unchanged direct @better-fetch/fetch pin at 1.3.1 conflicts with the exact 1.3.3 peer required by the newly selected @better-auth/core and @better-auth/sso, as shown in their updated bun.lock entries. npm's peer-dependency documentation notes that a “conflicting requirement may cause an error if the tree cannot be resolved correctly”; an in-memory check with npm's resolver confirms ERESOLVE for these pins, while the previous versions resolve successfully. Independently of the stale lockfile, update or remove the direct fetch pin so the mobile dependency tree can resolve.
Useful? React with 👍 / 👎.
mobile/ is outside the bun workspaces, so its separate npm lockfile still pinned better-auth at 1.7.1 and would fail the native types job's npm ci. Regenerated it and bumped the direct @better-fetch/fetch pin to 1.3.3, which the upgraded @better-auth/core and @better-auth/sso peers require. Verified: npm ci --prefix mobile --ignore-scripts, npx tsc --noEmit (mobile).
What this changes
Addresses #1987.
The issue's author offered to open this same PR. Nothing came of it in the day
since, so here is the four-version bump they described, with the lockfile
regenerated and the checks below run. Take theirs instead if they send it.
The locked versions in
bun.lockcarried four advisories that all have a fixedrelease. This moves the four and re-locks them; no call site changes.
better-auth1.7.1 → 1.7.27. GHSA-965c-763c-88jm (CRITICAL: an OAuth state canbe used as a magic link to sign in as another person) and GHSA-r4xp-prcw-77qf
(HIGH, OAuth Proxy) are fixed in 1.7.7. The app uses Generic OAuth for Okta and
SSO, so both app and mobile move, and the family is re-locked together:
core,sso,expoand the adapters.@modelcontextprotocol/sdk1.30.0 → 1.32.0. GHSA-6qxp-vccf-f47h (an MCP servercould choose the authorization server that receives the stored refresh token and
client secret) and GHSA-f897-62hf-6gxq (HTTP transports did not bound the request
body).
seroval1.6.3 → 1.6.11. GHSA-7rv5-mrxv-xcr9, GHSA-97r2-qh9m-474h.lodash-es4.18.0 → 4.18.1. GHSA-f23m-r3pf-42rh, and the rootoverrideswaspinning the vulnerable version itself.
bun installregenerates the lockfile;bun.lockis the only other file.Where it runs
Boundary and audit
Changelog
A deployment that upgrades now runs the patched
better-auth, so sign-in behavesdifferently for the two OAuth advisories above. I did not add a line under
Unreleasedbecause the last dependency bump for an advisory (#1809,fast-xml-parser→ 5.12.1) shipped without one. Say the word and I will add it.Proof
On this branch, at
66a11dc:bun run typecheckover every workspace needs more than the default Node heap:appaborted withIneffective mark-compacts near heap limitat 2 GB. WithNODE_OPTIONS=--max-old-space-size=6144it passes. That is the same onmainbefore this branch, so it is not something this change introduces.
mobilehas notypecheckscript registered as a workspace package, so its typeswere not checked here; the only change in it is four version strings.
I did not run the full
bun testsuite (the app tests need a running server) anddid not run an end-to-end sign-in against Okta or an SSO provider.