您好,我目前正在在线关注本教程:
https://auth0.com/docs/connections/passwordless/regular-web-app-email-code
,我遇到了一个问题。我不想在代码正确时重新编入url,而是想在执行诸如更改弹出html文件之后的操作。这是我用来验证代码的内容。效果很好,我只想能够在代码变到corect之后使它起作用:
function login(){
var email = $('#login-email').val();
var code = $('#login-token').val();
webAuth.passwordlessVerify({
connection: 'email',
email: email,
verificationCode: code
}, function (err,res) {
if (err) {
alert("Token invalid");
}
//do this stuff if token is verified
alert("login successful");
chrome.browserAction.setPopup({popup: "popup.html"});
});
};
感谢您的帮助。谢谢<3!