-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resend for /api/users/forgot-password over REST in Vercel #6457
Comments
Note: Same issue exists without using forgotPassword.generateEmailHTML within User collection > auth |
When you say "It doesn't look like you're sending any creds.", am I incorrect in thinking that the correct way of providing creds is through the payload config for the resendAdapter. Outside of that, forgot password should only require an email no? This is related to REST. I will follow up with OOTB forgot password. Thanks for your prompt reply BTW |
Further testing for me, neither REST nor /admin forgot password link works on Vercel. Can you see an issue with my implementation in the config?
|
Interesting reset hyperlinked text though.... |
Tried with
|
@JarrodMFlesch I just simply didn't set the variable from the template provided in the example.
I would expect to see some sort of Payload auth credentials being sent in the REST request in order to be able to invoke this route. Where are you actually calling this function from? Your front-end? A local script? Different server?
Just want to verify that this still works for you. I know this is not the same as your REST request, but it just helps troubleshooting. |
I am invoking forgotPassword from the NextJS (app) custom login page:
Response: I am unclear about 'Payload auth credentials' for forgot password endpoint, isn't this anonymous?
Only locally |
@peterjunsworth Can you provide a minimal reproduction repo? The forgot password link not working for you is most concerning to me, as this works just fine in my testing. |
@denolfe - just invited you to a fork of the repo. Everything fine and works as expected locally. Just vercel deployment no emails for me |
@denolfe - no worries if you haven't looked at this yet but I did see you forked the repo so thought I would check-in to see if you were able to replicate with that repo? |
@peterjunsworth The repo was a bit large, would appreciate a smaller reproduction that I can simply load and click something to reproduce. |
@peterjunsworth Could you simplify your reproduction? |
@denolfe - ye - I will do but under the gun right now so haven't had the opportunity yet |
ok @denolfe - finally got round to it. Just added you to the repo (let me know if didn't receive invite). I forked this repo from: https://github.com/payloadcms/payload-3.0-demo You will see the resend dependencies in the package.json file. Very simple setup using Mongo Atlas and @payloadcms/email-resend": "^3.0.0-beta.40" Hopefully I am just missing something minor. Cheers |
Await email sending, serverless may end before send Fixes #6457
Will have a fix going out in the next beta for this 👍 |
awesome - thanks. glad it wasn't just me being daft |
@peterjunsworth These email calls should now be awaited. Try it out on beta.46 and let me know 👍 https://github.com/payloadcms/payload/releases/tag/v3.0.0-beta.46 |
Fantastic - thanks @denolfe . I will definitely give it a try. Thank you for addressing |
This issue has been automatically locked. |
Resend does not receive email request on Vercel. Locally no issues.
Version:
payload.config.ts
REST Call
Users: CollectionConfig
The text was updated successfully, but these errors were encountered: