Email sign-in changed to use sign-in codes.#1389
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements a code-based email login flow, replacing the traditional email link authentication with a 6-digit verification code system while maintaining backward compatibility with links.
Key changes:
- New 6-digit numeric verification codes replace 64-character keys for sign-in
- Multi-step sign-in flow: email → name (for new users) → code verification
- New API endpoints for code verification, resending codes, and new user registration
Reviewed Changes
Copilot reviewed 64 out of 64 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
public/components/common/SignInControl.tsx |
Implements multi-step sign-in UI with code entry form |
app/handlers/signin.go |
Adds handlers for code verification, new user sign-in with name, and code resending |
app/actions/signin.go |
Defines new action types for code-based authentication flow |
app/models/entity/email_verification.go |
Adds method to generate 6-digit numeric codes |
app/pkg/rand/random.go |
Implements numeric-only random string generator |
views/email/signin_email.html |
Updates email template to display code prominently with link as alternative |
locale/*/server.json |
Updates email subject lines across all locales to include the code |
locale/*/client.json |
Adds translation keys for code entry UI elements |
e2e/step_definitions/*.ts |
Updates E2E tests to use code-based flow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| {emailSignInStep == EmailSigninStep.EnterName && renderNameField()} | ||
|
|
||
| {emailSignInStep == EmailSigninStep.EnterCode && renderCodeField()} |
There was a problem hiding this comment.
Use strict equality operator === instead of loose equality == for type-safe comparisons.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
|
@mattwoberts I've opened a new pull request, #1392, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@mattwoberts I've opened a new pull request, #1393, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@mattwoberts I've opened a new pull request, #1394, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@mattwoberts I've opened a new pull request, #1395, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@mattwoberts I've opened a new pull request, #1396, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@mattwoberts I've opened a new pull request, #1397, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: mattwoberts <109196+mattwoberts@users.noreply.github.com>
Replace loose equality with strict equality in SignInControl
|
@mattwoberts I've opened a new pull request, #1398, to work on those changes. Once the pull request is ready, I'll request review from you. |
We've made a nice set of changes to the sign up / in process. You're now asked for your name as part of the sign-in process, and then you're sent a code you can copy and paste into fider. It makes the whole process much nicer and friendlier. For die-hard fans of clicking a link there is still that option in the email.