Link inside verification-mail not working

回眸只為那壹抹淺笑 提交于 2019-12-11 08:04:20

问题


Could somebody explain, or better tell me how to fix this problem?

The link found in the "account creation verification email" on Parse-Server (/Heroku), is not working.

The relevant code in index.js is like this:

var api = new ParseServer({
  databaseURI: .....,
  cloud: .....,
  appId: .....,
  ..........
  publicServerURL: process.env.PARSE_PUBLIC_SERVER_URL || 'https://myapp.herokuapp.com',
  appName: 'WonderApp',
  ..........
  verifyUserEmails: true,
  emailAdapter: {
    module: 'parse-server-mailgun',
    options: {
      // The address that your emails come from
      fromAddress: 'yaya@abc.com',
      // Your domain from mailgun.com
      domain: 'xyz.com',
      // Your API key from mailgun.com
      apiKey: 'key-key-key-key-key-key-key-key',
      // The template section 
      templates: {
        verificationEmail: {
          subject: 'Confirm your account',
          pathPlainText: resolve(__dirname, 'verification_email.txt')
        },
      }
    }
  }
});

The verification mail is sent as expected, when an account is created. The user also receives it(as expected). The mail looks like:

Please confirm your account by clicking on the link below.

https://myapp.herokuapp.com/apps/YAdLIExyzABC(K#!qB....../verify_email?token=....uxY&username=theguy

But, then when clicking the link here what appears in the web browser:

Cannot GET /apps/YAdLIExyzABC(K 

This is not what I expect.

Could someone see where the problem could be?

One more thing I noticed, after trying many things to solve this problem is that, when typing the following line in the web browser :

https://myapp.herokuapp.com/apps/

I get this:

Cannot GET /apps/

I have the feeling this is not supposed to happen. But does anyone know why this happens?

来源:https://stackoverflow.com/questions/49206670/link-inside-verification-mail-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!