feat: email + password authentication (sign-in / sign-up / reset)#4
Open
apple-techie wants to merge 7 commits into
Open
feat: email + password authentication (sign-in / sign-up / reset)#4apple-techie wants to merge 7 commits into
apple-techie wants to merge 7 commits into
Conversation
Bite-sized TDD plan (7 tasks) for email+password sign-in, account creation, and password-reset-request in FeedbackPortalApp. Extends the existing AuthService/AuthStore/SignInSheet seam. Tracks the spec at docs/superpowers/specs/2026-05-31-password-auth-design.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
What
Adds email + password authentication to
FeedbackPortalAppalongside the existing email-OTP flow, via a segmented Email Code | Password sign-in sheet:POST /api/auth/sign-in/emailPOST /api/auth/sign-up/email(name + email + password;autoSignInsigns the user in immediately)POST /api/auth/request-password-reset; reset is completed on the web (the emailed link), the app only triggers itBoth sign-in and sign-up return a session token stored identically to the OTP token, so the existing
needsSignIn/ pending-action replay machinery composes unchanged.How
Extends the existing
AuthService→AuthStore→SignInSheetseam — no new architecture.APIError.auth(code:message:)— typed better-auth error bodyHTTPAuthService— 3 endpoint impls +{message,code}error parsing + sharedtoken(from:)helperAuthStore—signInWithPassword/signUp/requestPasswordReset/clearMessages, aninfoMessageproperty, andauthMessage(for:)mapping (INVALID_EMAIL_OR_PASSWORD→ "Wrong email or password.",USER_ALREADY_EXISTS→ "An account with this email already exists.", etc.)SignInSheet— segmented picker; password sign-in / create-account toggle (reveals Name) / forgot-password; client-side min-8-char gate; resets transient state + clears messages on mode switchTesting
swift test) — every new public method covered for success + failure, incl. error-body mapping andclearMessages.feedback.opencoven.ai: segmented toggle, password mode fields, disabled-gate, create-account toggle (Name field + button label + forgot-password visibility), sign-in/create toggle. Build bakes the live URL via the gitignored xcconfig opt-in.INVALID_EMAIL_OR_PASSWORD→ "Wrong email or password.", and the live endpoint returns that code for bad creds.Follow-up (manual, needs a real inbox)
End-to-end credentialed flows — real password sign-in, account creation, and the forgot-password email — need a real account/inbox and weren't driven automatically (and account creation is outward-facing on the live board). Reset email delivery also depends on the instance's SMTP/Resend config.
Notes
appendingPathComponentkept rather than the iOS 16+appending(path:)).docs/superpowers/specs/2026-05-31-password-auth-design.md; plan:docs/superpowers/plans/2026-05-31-password-auth.md.🤖 Generated with Claude Code