更改 Meteor 电子邮件验证链接和路由 [英] Change Meteor email validation link and route

查看:31
本文介绍了更改 Meteor 电子邮件验证链接和路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当 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.

这篇关于更改 Meteor 电子邮件验证链接和路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆