Hello everyone,
I have been facing an issue while implementing Auth0 with a username and password authentication method. Every time I try to log in, the login fails, and I receive the following error message: “Cannot read properties of undefined (reading ‘passwordless_method’)”. Additionally, the status code returned is 500.
Here is the code snippet I am using for the login process:
Auth0
.authentication()
.login(
usernameOrEmail: "pratik@engrossinfotech.com",
password: "xxx@12345",
realmOrConnection: "Username-Password-Authentication",
audience: "https://example.us.auth0.com/api/v2/",
scope: "openid profile email offline_access"
)
.start { result in
switch result {
case .failure(let error):
print(error.localizedDescription)
case .success(let credentials):
print(credentials)
}
}
Note:
– Version: Release 2.3.2 · auth0/Auth0.swift · GitHub
– Mac M2 and M1
– I have also tested the login functionality using WebAuth, and it worked without any issues.
– I have also allowed the Password in the Grant Types.
Any guidance or suggestions on resolving this issue would be greatly appreciated.
Thank you.