Enabling Reset Password and email verification for parse-server hosted locally

后端 未结 2 1377
耶瑟儿~
耶瑟儿~ 2020-12-09 00:04

I am trying to enable reset password and email verification for my parse-server-example installed locally. I could see we have https://github.com/parse-server-modules/parse-

相关标签:
2条回答
  • 2020-12-09 00:24
    1. Create account with MailGun, and get apiKey and Domain from its website.

    2. Copy and Paste below configuration under index.js file of your parse-server-example git folder at your local system.You can get this file under parse-server-example folder directly.


    verifyUserEmails: true,
    publicServerURL: 'https://yourproject.herokuapp.com/parse',
    appName: 'Parse App',
    emailAdapter: { 
        module: 'parse-server-simple-mailgun-adapter',
        options: { 
                   fromAddress: 'parse@example.com',
                   domain: '<domainProvidedFromMailGun>.mailgun.org', 
                   apiKey: 'key-FromMailGun', 
                 }
     },
    

    Push it to heroku app git, since I have piloted my parse-server to heroku so below cmd's will be valid.

    git add .
    git commit -m "mypush commit"
    heroku git:remote -a fast-springs-29785
    git push heroku master
    
    0 讨论(0)
  • 2020-12-09 00:27

    https://github.com/ParsePlatform/parse-server

    Email verification and password reset

    Verifying user email addresses and enabling password reset via email requries an email adapter. As part of the parse-server package we provide an adapter for sending email through Mailgun. To use it, sign up for Mailgun, and add this to your initialization code:

    var server = ParseServer({
      ...otherOptions,
      // Enable email verification
      verifyUserEmails: true,
      // The public URL of your app.
      // This will appear in the link that is used to verify email addresses and reset passwords.
      // Set the mount path as it is in serverURL
      publicServerURL: 'https://example.com/parse',
      // Your apps name. This will appear in the subject and body of the emails that are sent.
      appName: 'Parse App',
      // The email adapter
      emailAdapter: {
        module: 'parse-server-simple-mailgun-adapter',
        options: {
          // The address that your emails come from
          fromAddress: 'parse@example.com',
          // Your domain from mailgun.com
          domain: 'example.com',
          // Your API key from mailgun.com
          apiKey: 'key-mykey',
        }
      }
    });
    

    You can also use other email adapters contributed by the community such as parse-server-sendgrid-adapter or parse-server-mandrill-adapter.

    0 讨论(0)
提交回复
热议问题