また、その問題をAuth0/Lockサポートに指摘した後、解決策が見つかりました。
Lock
.classic()
.withOptions {
$0.scope = "openid profile"
$0.oidcConformant = true
$0.logHttpRequest = true
}
.withStyle {
$0.title = "App Name"
}
.onAuth { credentials in
print("successful login")
}
.onError { error in
print("Failed with error \(error)")
}
.present(from: self)
の代わりに、Webログイン:
Auth0
.webAuth()
.audience("https://alienbash.eu.auth0.com/userinfo")
.start {
switch $0 {
case .failure(let error):
// Handle the error
print("Error: \(error)")
case .success(let credentials):
// Do something with credentials e.g.: save them.
// Auth0 will automatically dismiss the hosted login page
print("Credentials: \(credentials)")
}
}
1は「Grant_Type」に変更することを確認する必要があり、いくつかのVC内のロッククライアントを使用する場合:多分これは同じ問題を抱えて、人々を助けますAuth0クライアントの設定でも、「パスワード」の許可が許可されます。そのためには、あなたのAuth0クライアントにに行く:
Settings --> Advances Settings --> Grant Types
とロック 『「新しいAuth0クライアントを作成し、使用するときに避けられないだろうと、このチェックマークはデフォルトでオフにされるパスワード』を確認してくださいクライアント。 ![enter image description here](https://i.stack.imgur.com/qIR5K.png)