更改流星电子邮件验证链接和路由 [英] Change Meteor email validation link and route
问题描述
当Meteor发送带有链接的电子邮件验证帐户时,链接如下所示:
// localhost:3000 /#/ verify-email / jOCevGxWbWQfcGL7KAtQ
如果您点击该链接,它会将帐户验证为魅力,但会将用户发送到ROOT模板。
我要更改此路由。点击验证链接必须将用户路由到另一个页面,另一个根路径('/')。
我已经尝试更改添加新模板的链接:
// localhost:3000 / template /#/ verify-email / jOCevGxWbWQfcGL7KAtQ
...它部分工作。
它验证该帐户完美,并将用户路由到正确的模板...但是这个解决方案打破了这个模板中的所有图像。
我该怎么办?
When Meteor sends the email with the link to validate the account, the link looks like this:
"//localhost:3000/#/verify-email/jOCevGxWbWQfcGL7KAtQ"
If you click on the link it validates the account as a charm, but it sends the user to the 'ROOT' template.
I want to change this route. Clicking on the validation link have to route the user to another page, another then root route ('/').
I have tryied changing the link adding a new template:
"//localhost:3000/template/#/verify-email/jOCevGxWbWQfcGL7KAtQ"
... and it works partially.
It verifies the account perfectly and routes the user to the right template... but this solution breaks all the images in this "template".
What should I do?
推荐答案
好的,这是我所做的。
我已经停止连接url,并在渲染的函数中创建一个动态链接,将应用程序路由到在电子邮件链接验证的时刻我想要的页面。
感谢Askhat您的答案是正确的,因为图像src需要/工作
Ok, here's what I have done.
I've stopped concatenating the url and made a dynamic link within the rendered function to route the app to the page I want in the moment of the e-mail link validation.
Thanks Askhat your answer was right on the spot, because the images src need the "/" to work as well.
这篇关于更改流星电子邮件验证链接和路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!