【发布时间】:2019-04-29 15:40:08
【问题描述】:
我下载了 auth0 快速启动项目 AngularJs SPA,以从 https://github.com/auth0-samples/auth0-angularjs-samples/tree/master/01-Login 启动我的应用程序。它工作正常,没有任何问题。
但是,当我按照https://auth0.com/docs/libraries/lock/v11/ui-customization 的说明自定义我的锁定 UI 时,第一次出现锁定 UI,但之后,锁定对话框一直出现。以下是我的代码片段:
function run(authService) {
// Handle the authentication
// result in the hash
debugger;
// Initializing our Auth0Lock
var options = {
theme: {
logo: 'assets/images/cat.png',
primaryColor: "#0077be"
},
languageDictionary: {
title: "Log in"
},
auth: {
redirectUrl: 'http://localhost:23321/#/callback'
}
}
var lock = new Auth0Lock(AUTH0_CLIENT_ID, AUTH0_DOMAIN, options);
lock.show();
// original code from quickstart
authService.handleAuthentication();
}
我尝试将选项放在 authService.js 中的登录功能中,但仍然无法正常工作。我试图退出 lock.show(),然后出现标准锁定 UI。这里有人可以帮忙吗?非常感谢!
【问题讨论】:
标签: auth0 auth0-lock