我正在处理 Auth0 Lock 集成,我收到错误Use of unresolved identifier 'connections'; 您的意思是“连接”吗?
.withConnections {_ in
connections.database(name: "Username-Password-Authentication", requiresUsername: true)
}
我将代码更改为
Connections.database(name: "Username-Password-Authentication", requiresUsername: true)
现在我收到错误实例成员“数据库”不能用于类型“连接”
当我将代码更改为
Connections().database(name: "Username-Password-Authentication", requiresUsername: true)
无法构造错误“连接”,因为它没有可访问的初始化程序
我将代码更改为
$0.database(name: "Username-Password-Authentication", requiresUsername: true)
获取匿名闭包参数不能在具有显式参数的闭包内使用
https://github.com/auth0/Lock.swift
https://auth0.com/docs/libraries/lock-ios/v2#configuration-options
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
Lock
.classic()
// withConnections, withOptions, withStyle, and so on
.withOptions {
$0.oidcConformant = true
$0.scope = "openid profile"
}
.onAuth { credentials in
// Let's save our credentials.accessToken value
}
.withConnections {_ in
connections.database(name: "Username-Password-Authentication", requiresUsername: true)
}
.withStyle {
$0.title = "Company LLC"
$0.logo = LazyImage(name: "123.png")
$0.primaryColor = UIColor(red: 0.6784, green: 0.5412, blue: 0.7333, alpha: 1.0)
}
.present(from: self)