Auth0: 自定义锁屏一直弹出 (AngularJs)
Auth0: The customize lock screen kept popping up (AngularJs)
我下载了 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。这里有人可以帮忙吗?非常感谢!
Sample uses Hosted login pages by default. To change the Lock UI in hosted pages, you need to apply the UI configurations in your hosted pages 而不是在应用程序代码中。
如果您在嵌入式模式下使用锁定,即没有重定向到 Auth0 Authorization 端点 /authorize
,则您需要从应用程序本身修改锁定配置。
我下载了 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。这里有人可以帮忙吗?非常感谢!
Sample uses Hosted login pages by default. To change the Lock UI in hosted pages, you need to apply the UI configurations in your hosted pages 而不是在应用程序代码中。
如果您在嵌入式模式下使用锁定,即没有重定向到 Auth0 Authorization 端点 /authorize
,则您需要从应用程序本身修改锁定配置。