I have been using Auth0's Lock widget for my app's Login flow. It works great, but now I need to pass additional parameters during login.
The Lock widget offers a parameters
attribute which the docs say will be "sent with every authentication requests". Sounds great, so I put this together:
let params = ["favoriteFood": Base64Encode("pizza")]
Lock.classic().withOptions {
$0.oidcConformant = true
$0.allow = [.Login, .ResetPassword]
...
$0.parameters = params
}
The issue is, my custom parameters aren't showing up inside the login request when I login with a database connection. When I login with a social connection like google, I am seeing these parameters.
Has anyone else found a solution to this? Or can someone clarify the purpose of this "parameters" attribute, so I can better understand how to use it?
NOTE:
The docs specify that "the following parameters are supported: access_token, scope, protocol, device, request_id, nonce and state
", so I tried renaming my custom parameter "state" instead of "customParams", but the issue remains.
There was a bug in the Lock project. Auth0 team has fixed the issue and closed my ticket: https://github.com/auth0/Lock.swift/issues/506