Skip to content

Fix misleading 'check your email' message when EMAIL_METHOD is dev#1692

Merged
deep1401 merged 3 commits intotransformerlab:mainfrom
greninja:fix/misleading-email-verification-message
Mar 30, 2026
Merged

Fix misleading 'check your email' message when EMAIL_METHOD is dev#1692
deep1401 merged 3 commits intotransformerlab:mainfrom
greninja:fix/misleading-email-verification-message

Conversation

@greninja
Copy link
Copy Markdown
Contributor

@greninja greninja commented Mar 30, 2026

Summary

Fixes #1682

When EMAIL_METHOD is "dev" (the default), verification emails are only logged to the console — never actually sent. But the UI says "check your email" and the console prints ✅ Verification email sent, which misleads users into waiting for an email that never arrives.

  • Backend: Console now prints 📋 Verification link logged to console above (as you're in dev mode) instead of the incorrect ✅ Verification email sent when in dev mode
  • Frontend: Added a note to both the registration confirmation and login error messages: "If running in dev mode, check the server logs for the verification link"

greninja and others added 2 commits March 30, 2026 09:24
When EMAIL_METHOD is "dev" (the default), verification emails are only
logged to the console and never actually sent. Update the UI messages
to note that users should check the server logs in dev mode, and fix
the backend console message that incorrectly said the email was sent.
if (result.info?.detail === 'LOGIN_USER_NOT_VERIFIED') {
setError(
'Email not verified. Please check your email for the verification link.',
'Email not verified. Please check your email for the verification link. If running in dev mode, check the server logs instead.',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is a good idea but just wanting to ideate whether you think adding a metadata field to healthz and then checking what mode EMAIL_METHOD is set to through that and then showing the appropriate message would be overkill?
The intent is that we dont show dev-related stuff when things are running in production. Please let me know if you think this is overkill?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, not an overkill! I was trying to keep things as simple as possible but missed the prod angle.

I've updated the PR — added email_method to the /healthz response and made the frontend messages conditional based on that. Now the dev mode note only shows when EMAIL_METHOD is actually "dev".

Let me know if you think further changes are required.

@sentry
Copy link
Copy Markdown

sentry bot commented Mar 30, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
api/transformerlab/models/users.py 0.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Add email_method to /healthz response so the frontend can check it.
Show "check the terminal" message only when EMAIL_METHOD is dev,
and "check your email" when SMTP is configured.
@deep1401 deep1401 merged commit d9e5cf8 into transformerlab:main Mar 30, 2026
11 of 12 checks passed
@greninja greninja deleted the fix/misleading-email-verification-message branch March 30, 2026 23:05
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.

Misleading "check your email" message while creating an account

3 participants