-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Tips for implementing password reset? #99
Comments
+1 |
Generally this has just a few parts:
If you have further questions let me know.. |
I have Xcode 7 IOS 9 Swift 2.1 project using Parse SDK, with already working signup email account activation ( email verification ) and reset password features. In the open source Parse Server, I don't see anywhere I can configure this email features when I migrate out of Parse hosting services. There seems no documentation about migration of this Parse hosted email feature anywhere either. What will happen to these existing hosted email features after migrating out of Parse to open source Parse Server hosted on AWS or Heroku as is? How can I configure to make these working again? |
They are not yet implemented in |
@gfosco Sounds, good thanks for your hint |
@gfosco would you say these are "going to come"? Like you did, for example, for push and dashboard. |
@gfosco is this password reset not going to be added to the parse-server? all the code gen and user codes are the hardest part. Curious if your team will be sharing examples for this or anything besides your 2 sentences. |
They are coming, as soon as the interface for mail adapters is nailed down. You can follow some discussion in #275. Look in the PRs and you'll see multiple competing implementations already. |
I was able to the reset password use case to work with SimpleMailgunAdapter. I did have to debug some of the internals though. This is the mailgun code: var SimpleMailgunAdapter = require('parse-server/lib/Adapters/Email/SimpleMailgunAdapter'); The tricky part was learning that the following arguments must be passed to the ParseServer ctor, otherwise you'll get different levels of failures: publicServerURL: process.env.PUBLIC_SERVER_URL || 'http://localhost:1337/parse' appName: process.env.APP_NAME || '<your app name?' emailAdapter: simpleMailgunAdapter I set publicServerURL to be the same as serverURL. Didn't really understand the need for both but if you don't set the publicServerURL it all doesn't work. |
publicServerURL should be set when you deploy remotely to a full domain URL as he clients won't be able to access the serverURL if that one refers to locallhost |
Is there still an option to user some parse password reset web template, like it was before going open source? I don't no much about web pages, so it'll be great if there is some default page where the user can change password. |
Is there a roadmap when password reset would be implemented in parse-server? |
This is implemented and fully functional, as well as password reset pages etc..: |
Awesome, yeah I see that now, Thanks @flovilmart I appreciate it! My mistake was that I didn't set the following correctly: That really should be specified more accurately to be: I thought it was just what the companies website was, not the actual endpoint that has the form which exists on the ParseServer through that project.... Appreciate your help though, much appreciated! |
Updated README with a Swift Configuration exemple
I am getting following error when trying to requestPasswordReset. also email is not going. |
I feel I am so close to figuring this out but I must be missing something! I've obviously managed to migrate the database over, I've managed to even get the push notifications working and I am able to run parse server remotely on my mac, but i am stuck with the password reset functionality. Mailgun is installed on my heroku add ons and I have changed all of my DNS keys so my domain says "active" on Mailguns end. On my desktop, I located my folder > found the parse-server-example-master > index.js in index.js I have put the following code. perhaps I have not replaced a necessary key? For the sake of this discussion, everywhere where I have replaced the example keys with my own keys begins with "&" symbol. After I replaced the following keys, I commit to my GItHub Desktop and Synced. The changes appear via my web github as expected. What am I doing wrong here? Xcode console still prints "[Error]: An appName, publicServerURL, and emailAdapter are required for password reset functionality. (Code: 1, Version: 1.14.2)" when I tap the "forgot password" button i've created. ANY HELP APPRECIATED!!!
(index.js code below) // Example express application adding the parse-server module to expose Parse var express = require('express'); var databaseUri = process.env.DATABASE_URI || process.env.MONGODB_URI; if (!databaseUri) { var api = new ParseServer({ databaseURI: databaseUri || '&mongodb://heroku_abcdefghijklmnopqrxzy@abcdefghijklmnopqrxzy.mlab.com:00000/heroku_abcdefghijklmnopqrxzy', <<<<<<< HEAD ======= }); var server = ParseServer({ publicServerURL: '&http://abcdefghijklmnopqrxzy.herokuapp.com/parse', }); var app = express(); // Serve static assets from the /public folder // Serve the Parse API on the /parse URL prefix // Parse Server plays nicely with the rest of your web routes // There will be a test page available on the /test path of your server url var port = process.env.PORT || 1337; // This will enable the Live Query real-time server WHAT AM I DOING WRONG?! THIS IS DRIVING ME NUTS :( |
Thanks for taking a look at it. I've been thinking all this morning about it and I think it's a possibility that I may not have either installed it to the right folder (I'm supposed to install " parse-server-simple-mailgun-adapter " directly into my "parse-server" folder correct?), or perhaps I did not put the code in the right index.js file. Previously I've located my app, and found the index.js file for my app. So for example theres a folder called myAppFolder. Inside I see folders that read "ParseStarterProject-Swift", "ParseStarterProject", and "parse-server-example-master". In "parse-server-example-master", I see an index.js file and that was the index.js file I added the above code to. But now I'm wondering if I should be editing the index.js file found in "parse-server" folder > "spec" folder > index.spec.js file? Can anyone give me insight into the exact index.js file I should be editing? |
you should not have the specs in your parse-server installation. How did you install parse-server? Did you use parse-server-example? |
I did, back in January. I followed the migration guide. |
ok, to install the mail adapter, did you run |
Yes in this way: " Felecias-iMac:parse-server feleciacoleman$ " it is correct to install this directly in the parse-server directory, yes? |
And actually, after doing some digging it appears I might have installed parse-server from "https://github.com/parse-community/parse-server" as opposed to "https://github.com/parse-community/parse-server-example" ... that would explain why I have the spec folder :/ |
how did you install it? did you clone the repository and deploy that? Did you follow the installation instructions? |
i ended up installing the parse server using homebrew. I followed those installation instructions as best as i could. I kept running into road blocks so I actually had to follow multiple different tutorials to get through all of the hurdles. It seemed that everything worked out because all of my data migrated and I was able to run the dashboard effectively, but by forgot password not working, now I'm wondering if I was wrong about thinking I installed it properly after all. |
I'm not aware you can install parse-server with homebrew, there is plenty of documentation for installing and setting up, I'm not sure what steps your used to install therefore I can't say what's right or wrong... |
Not even sure how you got there... |
you are right, in my case I needed to do a few steps (installing node & mongodb) prior to installing parse server that i used homebrew for, then i cloned the parse directory. I followed this tutorial here https://www.raywenderlich.com/146736/parse-server-tutorial-ios What would help me most is giving insight into which folders things are supposed to be downloaded into. For instance, the parse server tutorial link above says this: "Next, in the root folder of the Parse project, open index.js and replace the default database string with your MongoDB database URI: // With this If getting parse server installed required me to locate the root folder of my parse project and edit the index.js file in there, my thought was that that is also the folder where i need to install mailgun adapter and add the email adaptor options, however many posts on stackoverflow say that the file to where I edit the index.js and add the email adaptor options should be directly in the "parse-server" folder. What im saying is that I believe it's possible that my mailgun adapter installation may not be installed in the right folder, or perhaps i have not edited the proper index.js file. I think this is a directory location issue and it would be more effective for me to know what is correct versus asking you to do the ungodly task of trying to undo what ive done wrong (cause it could be many different things as I'm a newbie). thanks for spending time on this w me. |
@FeleciaGenet I might be wrong here, but I think you're coming at this from a WordPress background or something of the sort which is why you're confused about the directory structures for installing modules/components of your app... Parse Server and other apps/frameworks built with the MEAN stack or NodeJS utilize NPM (the Node Package Manager) which automatically installs modules into the root directory of your project. By root directory, I mean the directory which you presumably setup as a repository in source control (Git, Mercurial, etc...) and it the place where your |
Please help reset user password! publicServerURL: 'https://a.herokuapp.com/parse', The server works perfectly(all data loaded as well) When I try to reset password I have in log: What I am doing wrong ????? It is mean that everything is worked BUT IT IS NOT SENDING THE EMAIL |
@adamofsky did you able to sort this out, today I am in the same situation like yours. MailAdapter works fine with terminal/nmp however not able to setup in my app for password reset. |
Hi, I would like to look into implementing the password reset functionality. Any hints and tips for that?
Thanks!
The text was updated successfully, but these errors were encountered: