-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Error when trying to apply Email Verification and Password Reset #7317
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
Comments
I suggest you post your Parse Server configuration to get more specific support. The feature requires an email adapter to be set up with Parse Server. For now I am closing this as it does not seem to be a Parse Server issue. For help with Parse Server, here are some resources you can try:
Feel free to comment if you have any questions and we can re-open this issue. |
Hey @mtrezza , I have been reading about the email adapter and it looks like its already there in the server in the "/opt/bitnami/parse/node_modules/@parse/simple-mailgun-adapter" , and according to that I have edited my server.js file to be as follow:
So that is my server.js file in which I have read in documentations where to place the part of emailAdapter. Can you help me with this one please? |
I would just note at this point that the simple-mailgun-adapter is about to be deprecated. As alternative, there are a number of community provided email adapters. I suggest to try out the API Mail Adapter which has a demo script that allows you to verify whether your Mailgun configuration is correct, see the docs. This section is for Parse Server issues, for further support please use the links posted above. |
Hey @mtrezza , thank you for suggesting the API Mail Adapter, I have tried to lunch the demo script it failed at first with an error, digging around I have done a few changes in the script as per the instructions update in mailgun.js (https://github.com/mailgun/mailgun-js) the demo script (which is demo/index.js) is missing two lines at the beginning: |
These lines should only be needed if you upgraded the maingun adapter to 3.x; 2.x doesn't require these lines. Edit: Apologies, I just noticed that the adapter dependency is already on 3.x. In that you are correct, there is a PR already to correct the example. Did you install the adapter with |
No I actually used npm install to get the mailgun.js. yea actually this is the configuration file content:
|
My first guess would be to check the paths, it should work with a simple Also, the module should be without path, see the docs:
Can you share the package.json? |
I will try that simplifying the paths and changing the module. The following is the content of package.json that is located in the same directory of configuration file:
|
I think you shouldn't need any path in the module property, in fact I think that is not allowed. Parse Server uses an internal adapter loader and I think that is why the loading fails and no adapter is set. npm will take care of that, it should automatically load from node_modules dir. Also, there is still a dependency on simple-mailgun-adapte instead of the api mail adapter. I suggest you follow the adapter docs step-by-step:
|
Sure thing I will try out these suggestions and hopefully it works, Thanks a lot man really appreciate it |
Hey @mtrezza , I have tried to do the two suggested points but unfortunately still the same error keeps showing up An appName, publicServerURL, and emailAdapter are required for password reset and email verification functionality. I have tried looking up the file that generates the error which is UsersRouter.js and tried to play with the variables in it feeding in those required variables manually the interesting thing was another error showed saying mail adapter is missing. So it looks like the server is not recognizing the mail adapter when I install it using the npm command, and I think the reason is related to this warning that shows when I install the mail adapter:
so the npm installation is not finding package.json in the directory. but then it creates a package-lock.json file. |
You can try to get the configuration right on a local environment until it sends out a password reset email, ideally using the parse-server-example repo. When you know the config is right, you can try to deploy to a remote environment and get it to run there. This way you separate mail adapter config issues from environment issues. |
New Issue Checklist
Issue Description
I am building an android app and I am using Parse server through AWS EC2, so the issue is when I try to apply the method of Email verification and password reset as mentioned here: https://docs.parseplatform.org/android/guide/#resetting-passwords , and then run the app an error shows up in the logs
So I have done my reasearch over stackoverflow and almost everywhere and I have followed the instructions in this page: https://github.com/parse-community/parse-server#email-verification-and-password-reset , I have created a mailgun and using their sanbox domain and api, also I have edited the server.js file located in /opt/bitnami/parse-dashboard , and have tried to reboot the server using sudo reboot, but still no luck the same error keeps showing up
Steps to reproduce
Actual Outcome
Expected Outcome
Failing Test Case / Pull Request
Environment
Server
Database
Client
Logs
The text was updated successfully, but these errors were encountered: