You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I turn off Wifi + Mobile Data, and I call oauth/token through Auth0.swift, I receive the following error:
Unhandled error happened: The credentials renewal failed. CAUSE: Unable to complete the operation. CAUSE: Error Domain=NSURLErrorDomain Code=-1020 "A data connection is not currently allowed."
AuthenticationError.isNetworkError will report this as false, because:
Error code -1020 is equivalent to .dataNotAllowed which is not in the list of networkErrorCodes.
Interestingly, if I put the phone into airplane mode, I receive .notConnectedToInternet and this is reported as network error... 🤯
What is the intended purpose of isNetworkError?
I was intending to use it to distinguish between unknown errors and network errors.
Reproduction
Log in with a user on a physical device
Turn off Mobile Data + Wifi
Call CredentialsManager.credentials(minTTL:) with a token that triggers the oauth/token endpoint
Notice the returned error, and isNetworkError being false
Additional context
No response
Auth0.swift version
2.5.0
Platform
iOS
Platform version(s)
16.1.1
Xcode version
15.0
Package manager
Cocoapods
The text was updated successfully, but these errors were encountered:
Checklist
Description
When I turn off Wifi + Mobile Data, and I call
oauth/token
through Auth0.swift, I receive the following error:AuthenticationError.isNetworkError
will report this asfalse
, because:Error code
-1020
is equivalent to.dataNotAllowed
which is not in the list ofnetworkErrorCodes
.Interestingly, if I put the phone into airplane mode, I receive
.notConnectedToInternet
and this is reported as network error... 🤯What is the intended purpose of
isNetworkError
?Reproduction
CredentialsManager.credentials(minTTL:)
with a token that triggers theoauth/token
endpointisNetworkError
beingfalse
Additional context
No response
Auth0.swift version
2.5.0
Platform
iOS
Platform version(s)
16.1.1
Xcode version
15.0
Package manager
Cocoapods
The text was updated successfully, but these errors were encountered: