我使用parse-server,之前parse.com作爲我的應用程序的後端。很簡單,我從來不需要擔心電子郵件驗證是如何處理的。如何通過點擊收到的鏈接來驗證電子郵件?
但我注意到,發送到用戶電子郵件地址的驗證鏈接打開了一個沒有JavaScript或任何與後端通信的普通html網頁。
<!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的博客並沒有解釋其背後的機制。 請幫助我的好奇心,非常感謝你。
這就是你看到的響應頁面(甚至作爲的結果,再直接),這不是你點擊其中將包含某種令牌,單擊該按鈕是對匹配時產生的「待定」狀態標記的鏈接(服務器端)。 – ochi
「*他們怎麼能做到這一點不發送一些數據回服務器*?」 - 點擊鏈接已經發送一些東西到服務器(HTTP請求)。 – melpomene
這是真的,不能相信我錯過了HTTP請求。謝謝。 – user3685578