Thanks for help.
I tried your suggestions but I had no result. I did not understand the point 7: how can I enable debugging? Can you explain it better please?
For give you more informations, this is for now the code that I use to call the login interface in my app:
let launchUrl = SceneDelegate.universalLinkToLaunch ?? SceneDelegate.shortcutLinkToLaunch ?? rootUrl;
SmartAirfield.webView.load(URLRequest(url: launchUrl))
In the past we not used the Auth0 package, I installed now and I’m trying also another approach with this function:
func login() {
Auth0
.webAuth()
.start { result in
switch result {
case .failure(let error):
// The user either pressed the “Cancel” button
// on the Universal Login screen or something
// unusual happened.
if error == .userCancelled {
let alert = UIAlertController(
title: "Please log in.",
message: "You need to log in to use the app.",
preferredStyle: .alert)
alert.addAction(
UIAlertAction(
title: NSLocalizedString(
"OK",
comment: "Default action"
),
style: .default,
handler: { _ in
NSLog("Displayed the \"Please log in\" alert.")
}))
self.present(alert, animated: true, completion: nil)
} else {
print("An unexpected error occurred: \(error.localizedDescription)")
}
case .success(let credentials):
// The user successfully logged in.
self.userIsAuthenticated = true
self.user = User.from(credentials.idToken)
DispatchQueue.main.async {
}
} // switch
} // start()
}
but for now nothing. I’m new to swift programming.
Anyway, another detail is that the error that I described is shown when the user finish the login phase. For make an example: I open the app, I choose login with google, I put email and password, and after the login is successful the user is redirect in the page that give the error.