Closed L1nberal closed 9 months ago
I have the same issue. Calling the /api/passwordless/send-link endpoint returns a 400:
{
"data": null,
"error": {
"status": 400,
"name": "Error",
"message": "Forbidden",
"details": {}
}
}
The token gets created and the exception gets raised when attempting to send the email.
Here it fails (strapi-plugin-passwordless/server/services/passwordless.js:118-121):
// Send an email to the user.
return await strapi
.plugin('email')
.service('email')
.send(sendData);
I have configured sendgrid as the email provider and the test mails are getting send out correctly.
Thank you for the report, could you please provide more information about your strapi configuration?
What is the version of strapi? What is the version of the plugin? Do you have configured email plugin (https://docs.strapi.io/developer-docs/latest/plugins/email.html)? What is the mailing service used?
Thank you for your reply!
Strapi v4.5.0 is running on a dev server in development mode with this configuration:
"dependencies": {
"@strapi-community/strapi-provider-upload-google-cloud-storage": ">=4.2.3",
"@strapi/plugin-i18n": ">=4.5.0",
"@strapi/plugin-sentry": ">=4.5.0",
"@strapi/plugin-users-permissions": "^4.4.5",
"@strapi/provider-email-sendgrid": "^4.4.5",
"@strapi/strapi": ">=4.5.0",
"pg": "^8.7.3",
"strapi-plugin-passwordless": "^4.0.8"
}
Sendgrid as the mailservice is properly configured, the test emails are send out correctly.
I resolved the issue. In my case it was a wrongly configured sender email address in the passwordless configuration since sendgrid needs an email address which is verified with sendgrid. That lead to the following sendgrid error:
The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements
@r0und3r thank you for the update, @L1nberal do you have any results, are you still need help?
I've installed the plugin and do whatever the docs say and I do create tokens that allow accounts to log in. However, I have to copy the token manually then put it into the API to log in. Tokens are generated even though errors pop up and my Gmail account doesn't receive any confirmation emails.