电子邮件验证链接可在Chrome中使用,但不能在Safari或Firefox中使用 [英] Email verification links works in Chrome but not Safari or Firefox

查看:65
本文介绍了电子邮件验证链接可在Chrome中使用,但不能在Safari或Firefox中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个向用户发送验证电子邮件的应用程序.用户必须在此处单击类似于以下的电子邮件验证链接: http://example.com/#/verify/5133110562f8cb5171ff0033 .Safari和Firefox都没有自动单击此链接,而是自动重定向到 http://example.com/.这样可以防止用户注册.我已经检查了后端,并且从未击中验证用户的路由,这意味着该链接在Firefox或Safari中实际上从未被击中.有什么想法为什么可以在Chrome浏览器中正常运行,而其他两个却不可行?

I have an application that sends users a verification email. From here, the user must click an email verification link which looks like this: http://example.com/#/verify/5133110562f8cb5171ff0033. Instead of hitting this link, Safari and Firefox both automatically redirect to http://example.com/. This prevents the user from signing up. I've checked our backend, and the route that verifies a user is never being hit, meaning that this link is never actually hit in Firefox or Safari. Any ideas on why this would work in Chrome but not the other two?

编辑我最初以为这个问题完全是由浏览器造成的,但是我实际上认为这可能是由于React-router引起的,我正在使用它来处理ReactJS应用程序中的路由.

EDIT I initially thought this problem was strictly due to the browser, but I actually think it is likely coming from react-router, which I am using to handle the routes in my ReactJS application.

推荐答案

问题出在这里:

我描述的链接以

"http://" 

而不是

"http://www"

尽管Chrome仍然可以理解,该URL仍然描述了example.com的相对URL,但是Firefox和Safari只会将您重定向到首页.添加"www"可解决此问题.

While Chrome will still understand that this URL still describes a relative URL of example.com, Firefox and Safari will simply redirect you to the homepage. Adding a "www" fixes the problem.

这篇关于电子邮件验证链接可在Chrome中使用,但不能在Safari或Firefox中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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