【发布时间】:2016-05-03 17:14:21
【问题描述】:
我正在试验来自 www.auth0.com 和 AngularJS 的 auth0-lock。 我能够像在 SDK 中一样传递一些参数:https://auth0.com/docs/libraries/lock/customization#connections-array-
auth.signin({
disableSignupAction: true,
socialBigButtons: true,
//these lines don't work
//no changes (username, password appears)
//connection: 'windows-live'
//this line returns 'No valid connection found'
//connections: 'windows-live'
//this line returns 'No valid connection found'
//connections: ['windows-live']
//this line doesn't change anything
//connection: ['windows-live']
}
但我无法传递连接(来自 SDK 的非角度版本)
lock.show({
connections: ['twitter', 'facebook', 'linkedin']
});
两个参数connection或connections都不起作用。
我遇到的问题是,如果我不指定连接(connections)用户名和密码就会出现。根据 SDK,我需要对其进行硬编码,以隐藏这些字段。 由于 SDK 是为 JS 而不是 AngularJS 编写的,因此我似乎在传递数组或参数时遇到了问题。 有什么想法吗?
【问题讨论】: