Error occurred logging into
Checklist
- [X] The issue can be reproduced in the Auth0.swift sample app (or N/A).
- [X] I have looked into the README and have not found a suitable solution or answer.
- [X] I have looked into the API documentation and have not found a suitable solution or answer.
- [X] I have searched the issues and have not found a suitable solution or answer.
- [X] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- [X] I agree to the terms within the Auth0 Code of Conduct.
Description
I have a few issues
- The user reported that he cannot log in, that the page is constantly reloaded if he logs in via email.
- If at the entrance through the
Sign up with Applerefresh the screen and log in again, then the errorError occurred logging intoappears
I use WebAuthentication.safariProvider()
let auth0ClientId: String = try PrettyInfoPlistExecutor.value(for: "AUTH0_CLIENT_ID")
let auth0Domain: String = try PrettyInfoPlistExecutor.value(for: "AUTH0_DOMAIN")
webAuthentication = Auth0.webAuth(clientId: auth0ClientId, domain: auth0Domain)
.scope("openid offline_access email update:current_user_metadata")
.provider(WebAuthentication.safariProvider())
authentication = Auth0.authentication(clientId: auth0ClientId, domain: auth0Domain)
Reproduction
https://user-images.githubusercontent.com/37621354/192509442-aa8a718c-c185-4f6e-bdb3-2d898fa56758.MP4
https://user-images.githubusercontent.com/37621354/192510326-c94b42cb-6568-4c30-ac39-d5f3eec57dab.MP4
Auth0.swift version
2.3.1
Platform
iOS
Platform version(s)
14.7, 15*, 16.0
Xcode version
Version 14.0 (14A309)
Package manager
CocoaPods
Hi @YevhenVovk, thanks for raising this.
- Can you please confirm that the issue can be reproduced in the Auth0.swift sample app?
- Is there any error being logged to the console when you enable logging? Please post it –redacting any sensitive information.
Hi, @Widcket Yes, reproduced in your example
On the first issue logs are not displayed
Logs for the second issue. These are the logs from your sample app
ASWebAuthenticationSession:
https://test-dev.auth0.com/authorize?state=d81efAEnSRonbAzxuNKspuocxi-Nlgrz5CW0UsgSKlQ&code_challenge=dIP5dZRQYxRoKVOPoJQ3XHwqORh0ztecKlsyV&redirect_uri=com.test.mobile.develop://test-dev.auth0.com/ios/com.test.mobile.develop/callback&code_challenge_method=S256&response_type=code&scope=openid%20profile%20email&client_id=8UI5xYjyUkY6o&auth0Client=eyJlbnYiJ9
Callback URL:
com.test.mobile.develop://test-dev.auth0.com/ios/com.test.mobile.develop/callback?code=LlqnI37y0VigpSq8OSx5h&state=hKFo2SBmaTM0N3YyYUOjY2lk2SA4VUk1eFlqeVVrWVBBU2xiUnA0OUN5UjhzOTBzM1M2bw
Failed with: Invalid callback URL:
com.test.mobile.develop://test-dev.auth0.com/ios/com.test.mobile.develop/callback?code=LlqnI37y0VigpSq8OSx5h&state=hKFo2SBmaTM0N3YyYUOjY2lk2SA4VUk1eFlqeVVrWVBBU2xiUnA0OUN5UjhzOTBzM1M2bw
Hi @Widcket, any updates?
Hi @YevhenVovk, apologies for the delay.
Looks like you have an invalid callback URL, which suggests a configuration issue –not an SDK issue. I'd suggest checking your Auth0 application's configuration, any Rules/Actions, the configuration of the SDK, etc.
Closing, as this does not seem to be an SDK issue. Please feel free to ping if you'd prefer to reopen.