feat: E1 — Auth & Accounts ## Goal Better-auth is wired up. Round out - #350
Closed
fly-productivity-manager[bot] wants to merge 1 commit into
Closed
feat: E1 — Auth & Accounts
## Goal
Better-auth is wired up. Round out #350fly-productivity-manager[bot] wants to merge 1 commit into
fly-productivity-manager[bot] wants to merge 1 commit into
Conversation
## Goal Better-auth is wired up. Round out [fly-dev run run_f37055b275f24bf7aea7fbc6c3e87700]
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
editor | c7039ff | Aug 17 2026, 07:24 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
spooool | c7039ff | Aug 17 2026, 07:24 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
All three fixes are in place. Here's a summary of what was done and what the E1 state looks like:
E1 Status: Complete (with 3 bug fixes applied)
The full auth & accounts epic was already implemented in the codebase. I found and fixed three real issues:
Bugs fixed
1. Captcha plugin always-on bug (
src/auth/index.ts)captcha({ secretKey: env.TURNSTILE_SECRET_KEY || '' })unconditionally registered the plugin, which requires anx-captcha-responseheader on every auth request. But the frontend only renders the Turnstile widget whenVITE_TURNSTILE_SITE_KEYis set. Any environment without both env vars would silently block all sign-up and sign-in. Fixed with the same conditional pattern used for social providers.2. Email change didn't reset verification (
src/workers/account.ts)PUT /api/account/emailupdated the address but leftemailVerified = true, meaning a user could claim any email address and appear verified without ever confirming it. Fixed: the UPDATE now setsemailVerified = 0so the new address must be confirmed.3. Resend button used stale session email (
src/frontend/pages/AccountSettings.tsx)After saving a new email, the "Resend verification email" button called
resendVerificationEmail(session.user.email)— but the session is cookie-cached for 5 minutes, so it would send the verification link to the old address. Fixed: it now usesemailDraft(which is refreshed byreload()after save) with the session email as a fallback.Already complete
Tests
Opened automatically by fly-dev run run_f37055b275f24bf7aea7fbc6c3e87700.