hasura-auth
hasura-auth copied to clipboard
Incorrect log warning when sending emails
When a new user signs up, we get the following error log messages "No template found at /app/email-templates/en/email-verify/body.txt" and also here in the repo there is no "text version" of the emails.
Is there an error in our configuration, is a template missing or is this intentional?
We have Nhost v2 set up on AWS as a self-hosted solution.
same issue
We found out that this error occurs when the SMTP server is unreachable. We had an SMTP downtime and at the same time we had the error logs, after the SMTP server was reachable the error logs also disappeared. The error log is a bit confusing, it seems like the error handling doesn't really work here.
Hello, Thanks for this. Yes, it is not a bug, but an incorrect log entry. I'm reopening and changing the title so we can put some efforts in muting this warning
Changing these in nhost-project/nhost/config.yaml
allowed me to authenticate users locally using nhost-cli
auth:
access_control:
email:
allowed_email_domains: ""
allowed_emails: ""
blocked_email_domains: ""
blocked_emails: ""
url:
allowed_redirect_urls: ""
- anonymous_users_enabled: false
+ anonymous_users_enabled: true
client_url: http://localhost:3000
disable_new_users: false
email:
- enabled: false
+ enabled: true
passwordless:
enabled: false
- signin_email_verified_required: true
+ signin_email_verified_required: false
using the @nhost/nhost-js
, setup your client using:
import { NhostClient } from '@nhost/nhost-js';
export const nhost = new NhostClient({
backendUrl: 'http://localhost:1337',
// subdomain: process.env.NHOST_SUBDOMAIN,
// region: process.env.NHOST_REGION,
devTools: true
});
Enjoy working locally :clinking_glasses: :beers:
@Parables What's your output of nhost up
? I suspect there is a warning about a configuration update for SMTP settings.
About the warning. The warning is technically correct, but maybe the warning is only logged when the SMTP settings are correctly configured, and the SMTP server is reachable.
Either we ship a .txt template for each email template or document how users can add a .txt template if they want to.
One reason for not shipping a .txt file is that most email servers/clients use the .html template, so the .txt file is mostly unnecessary.