Reputation: 13
I recently migrated my database from my Parse account to MongoLab and I've also set up a Parse Server on Heroku. Everything is working great except that I want to add an email verification feature using the emailVerified parameter that exists in Parse and I don't see how to do it because I didn't had the option activated before migrating my database. Thanks.
Upvotes: 1
Views: 1899
Reputation: 499
You can use SendGrid for this. You need to install parse-server-sendgrid-adapter to your parse-server directory.
Run this command inside your parse-server directory:
npm i parse-server-sendgrid-adapter
After installation finishes. You need to set variables inside your index.js file.
var SimpleSendGridAdapter = require('parse-server-sendgrid-adapter');
And add these to your var api = new ParseServer function as parameters:
.
.
.
appName: '', //enter your app name
publicServerURL: '', //enter your server url
verifyUserEmails: true,
emailAdapter: new SimpleSendGridAdapter({
apiKey: '***', //enter your api key
fromAddress: '' //the address that mails will be sending.
}),
customPages: {
invalidLink: 'http://yourpage/link_invalid.html',
verifyEmailSuccess: 'http://yourpage/verify_email_success.html',
choosePassword: 'http://yourpage/new_password.html',
passwordResetSuccess: 'http://yourpage/sucess.html'
},
.
.
.
Also enable email verification from your app's Parse dashboard.
Upvotes: 0
Reputation: 7108
I think you might have to add the feature yourself using a combination of Cloud Code and a mailing service such as Mandril or SendGrid.
Cannot currently find the reference, but believe I saw somewhere that this is the case. It would make sense as any mailing service would need some form of credentials in order to handle emailing.
You could of course also have a look at the source code to verify: https://github.com/ParsePlatform/parse-server
Upvotes: 1