Skip to content

Upgrade Better Auth to 1.7.27 - #243

Merged
tnkuehne merged 2 commits into
mainfrom
chore/better-auth-1.7.27
Nov 20, 2026
Merged

tnkuehne merged 2 commits into
mainfrom
chore/better-auth-1.7.27

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What changes

  • better-auth, @better-auth/core, @better-auth/oauth-provider and @better-auth/sso move from 1.7.12 to 1.7.27 in the control plane, the auth proxy and the Gmail, GitHub and OneDrive templates. better-call moves to 1.4.6, the version Better Auth 1.7.27 requires.
  • OAuth provider patch: the /sign-in/sso hunk is removed. 1.7.27 carries the pending authorization through company SSO itself (fix(oauth-provider): resume the authorization after an OIDC SSO sign-in better-auth/better-auth#12727). The device-code hunks that keep the approving session, its consent reference and its authentication time are rebuilt against 1.7.27's chunk layout without behavior changes.
  • Device authorization patch (better-auth): applies unchanged. 1.7.x still approves device codes without the guarded write; upstream fixes this only in 1.8.
  • Microsoft patch (@better-auth/core): rebuilt on top of 1.7.16's parseStringBoolean handling of email_verified. An explicit email_verified decision still wins; otherwise xms_edov: true or a matching verified address proves the email.
  • Invitations: since 1.7.16, resending an invitation that grants the owner role requires the owner role. The members page already showed Resend invitation for owner invitations only to owners; the API and CLI now refuse it for administrators with 403. The integration test now checks both the refusal and an owner's resend.

Why

The releases since 1.7.12 include fixes that apply to this deployment:

  • OIDC SSO sign-in resumes app authorization upstream (#12727), replacing a local patch.
  • Requests hanging on Cloudflare Workers: OAuth provider requests with resources (#12395), verification value consumption (#12451), schema validation (#11716).
  • Security fixes in 1.7.16 (#12198), including string email_verified claims from Microsoft Entra ID being read as verified, and built-in social providers no longer following redirects during token exchange (#12106).
  • Token requests that fail PKCE, redirect_uri or resource validation no longer consume the authorization or device code (#12499).

Tests

  • pnpm check passes.
  • pnpm exec vitest run: 1139 passed. runtime-errors.integration.test.ts needs a built Node server and fails the same way on main without one.
  • Cloudflare build, both wrangler deploy --dry-run bundles and RUN_CLOUDFLARE_TESTS=1 pnpm exec vitest run apps/control-plane/tests/cloudflare: 248 passed, including app sign-in resuming after Microsoft sign-in and company SSO, and device authorization with token refresh across independent Worker requests. The control-plane bundle contains a single copy of better-auth.

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

The PR appears safe to merge, with no new actionable findings or outstanding previous findings.

Summary

Upgrades Better Auth from 1.7.12 to 1.7.27 across the control plane, auth proxy, and connector templates.

  • Company sign-in and OAuth flows use Better Auth 1.7.27.
  • Microsoft sign-in honors explicit email claims and verified-domain proof.
  • CLI tokens keep the context of the session that approved their device code.

No new actionable issues were found. Tests were not rerun; dependencies are not installed in this checkout.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Approving session] --> B[Capture company reference and sign-in time]
  B --> C[Approve pending device code]
  C --> D[Exchange device code]
  D --> E[Issue scoped tokens]
  E --> F[Refresh with the same reference]
Loading

Reviews (2) · Last reviewed commit: "Cover string email_verified claims in th..." · Reviewed by Greptile

Better Auth 1.7.27 resumes a pending OAuth authorization after an OIDC
SSO sign-in (`/sign-in/sso`), so that part of the OAuth provider patch
is removed. The device approval, device-code reference and Microsoft
email-domain proof patches are rebuilt for 1.7.27; their behavior is
unchanged.

Since 1.7.16, resending an invitation that grants the owner role
requires the owner role. The members page already offered resend for
owner invitations only to owners; the API and CLI now match it.
Comment thread patches/@[email protected] Resolved
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs 411dcf6 Nov 20 2026, 01:19 PM

@tnkuehne
tnkuehne merged commit 54d942b into main Nov 20, 2026
17 checks passed
@tnkuehne
tnkuehne deleted the chore/better-auth-1.7.27 branch November 20, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant