【发布时间】:2021-10-29 14:53:28
【问题描述】:
我使用 parse-server,以前是 parse.com 作为我应用程序的后端。这很简单,我永远不需要担心电子邮件验证的实际处理方式。
但我注意到发送到用户电子邮件地址的验证链接会打开一个纯 html 网页,该网页没有 JavaScript 或任何与后端通信的内容。
<!DOCTYPE html>
<html>
<!-- This page is displayed whenever someone has successfully reset their password.
Pro and Enterprise accounts may edit this page and tell Parse to use that custom
version in their Parse app. See the App Settigns page for more information.
This page will be called with the query param 'username'
-->
<head>
<title>Email Verification</title>
<style type='text/css'>
h1 {
color: #0067AB;
display: block;
font: inherit;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica;
font-size: 30px;
font-weight: 600;
height: 30px;
line-height: 30px;
margin: 45px 0px 0px 45px;
padding: 0px 8px 0px 8px;
}
</style>
<body>
<h1>Successfully verified your email!</h1>
</body>
</html>
所以我想知道服务器是如何跟踪链接确实被点击和验证的。他们如何在不将一些数据发送回服务器的情况下实现这一目标?
http://blog.parse.com/announcements/introducing-app-email-settings/
Parse.com 的博客没有解释其背后的机制。 请帮助我好奇的心,非常感谢。
【问题讨论】:
-
那是您看到的响应页面(甚至可能是重定向的结果),这不是您单击的链接(其中将包含某种标记,当单击时与“待定”匹配' 在服务器端生成的状态令牌)。
-
“他们如何在不将一些数据发送回服务器的情况下实现这一目标?” - 点击一个链接已经向服务器发送了一些东西(一个 HTTP 请求)。跨度>
-
确实如此,不敢相信我错过了 HTTP 请求。谢谢。