【发布时间】:2018-08-18 18:53:45
【问题描述】:
谁能解释一下,或者更好地告诉我如何解决这个问题?
在 Parse-Server (/Heroku) 上的“帐户创建验证电子邮件”中找到的链接无效。
index.js中的相关代码是这样的:
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')
},
}
}
}
});
创建帐户后,验证邮件将按预期发送。 用户也收到它(如预期的那样)。邮件如下:
Please confirm your account by clicking on the link below.
https://myapp.herokuapp.com/apps/YAdLIExyzABC(K#!qB....../verify_email?token=....uxY&username=theguy
但是,当单击此处的链接时,Web 浏览器中会显示:
Cannot GET /apps/YAdLIExyzABC(K
这不是我所期望的。
有人能看出问题出在哪里吗?
在尝试了很多方法来解决这个问题之后,我注意到的另一件事是,在网络浏览器中键入以下行时:
https://myapp.herokuapp.com/apps/
我明白了:
无法获取 /apps/
我觉得这不应该发生。但是有人知道为什么会这样吗?
【问题讨论】:
-
嘿伙计,你找到解决办法了吗?
标签: node.js parse-server mailgun pfuser email-verification