用户无法通过Auth0验证电子邮件验证帐户

时间:2019-03-22 00:27:55

标签: reactjs authentication web-applications auth0 email-verification

我创建了一个React Web App,要求用户首先使用Auth0进行注册或登录。每当新用户注册时,都会有一封验证电子邮件发送到该用户的电子邮件地址,并要求您验证帐户。

这是我在Auth0上设置的电子邮件模板,如下所示:

<html>
  <head>
    <style type="text/css">
      .ExternalClass,.ExternalClass div,.ExternalClass font,.ExternalClass p,.ExternalClass span,.ExternalClass td,img{line-height:100%}#outlook a{padding:0}.ExternalClass,.ReadMsgBody{width:100%}a,blockquote,body,li,p,table,td{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}table,td{mso-table-lspace:0;mso-table-rspace:0}img{-ms-interpolation-mode:bicubic;border:0;height:auto;outline:0;text-decoration:none}table{border-collapse:collapse!important}#bodyCell,#bodyTable,body{height:100%!important;margin:0;padding:0;font-family:ProximaNova,sans-serif}#bodyCell{padding:20px}#bodyTable{width:600px}@font-face{font-family:ProximaNova;src:url(https://cdn.auth0.com/fonts/proxima-nova/proximanova-regular-webfont-webfont.eot);src:url(https://cdn.auth0.com/fonts/proxima-nova/proximanova-regular-webfont-webfont.eot?#iefix) format('embedded-opentype'),url(https://cdn.auth0.com/fonts/proxima-nova/proximanova-regular-webfont-webfont.woff) format('woff');font-weight:400;font-style:normal}@font-face{font-family:ProximaNova;src:url(https://cdn.auth0.com/fonts/proxima-nova/proximanova-semibold-webfont-webfont.eot);src:url(https://cdn.auth0.com/fonts/proxima-nova/proximanova-semibold-webfont-webfont.eot?#iefix) format('embedded-opentype'),url(https://cdn.auth0.com/fonts/proxima-nova/proximanova-semibold-webfont-webfont.woff) format('woff');font-weight:600;font-style:normal}@media only screen and (max-width:480px){#bodyTable,body{width:100%!important}a,blockquote,body,li,p,table,td{-webkit-text-size-adjust:none!important}body{min-width:100%!important}#bodyTable{max-width:600px!important}#signIn{max-width:280px!important}}
    </style>
  </head>
  <body>
    <center>
      <table style="width: 600px;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;mso-table-lspace: 0pt;mso-table-rspace: 0pt;margin: 0;padding: 0;font-family: &quot;ProximaNova&quot;, sans-serif;border-collapse: collapse !important;height: 100% !important;" align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
        <tr>
          <td align="center" valign="top" id="bodyCell" style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;mso-table-lspace: 0pt;mso-table-rspace: 0pt;margin: 0;padding: 20px;font-family: &quot;ProximaNova&quot;, sans-serif;height: 100% !important;">
          <div class="main">
            <h1>Welcome!</h1>

            <p>Thank you for signing up. Please verify your account</p>
      
            <a href="{{ url }}">Confirm my account.</a>

            <br>
            Thanks!
            <br>

            <br><br>
            <hr style="border: 2px solid #EAEEF3; border-bottom: 0; margin: 20px 0;">
            <p style="text-align: center;color: #A9B3BC;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;">
              If you did not make this request, please contact us by replying to this mail.
            </p>
          </div>
          </td>
        </tr>
      </table>
    </center>
  </body>
</html>

对于<a href="{{ url }}">Confirm my account.</a>链接部分,我不确定url重定向到什么。当新用户单击该链接时,它将显示为this,并且该用户仍未得到验证。

我找不到很好的文档来帮助我理解验证电子邮件的工作原理。我仍然需要在Auth0上设置任何内容,以便用户通过验证电子邮件验证其帐户吗?

0 个答案:

没有答案