Comments (3)
What is your actual issue? That you want to update Ux on the main thread? In that case you should call the main thread inside your closure and this is your responsibility. If you want to see this in action, please take a look at the samples:
https://github.com/auth0-samples/auth0-ios-swift-sample
from auth0.swift.
No, I think you misunderstand, I am saying that if a method goes to the background thread it should either state it in its docs or bring you back to the main thread when it is done internally, I don't think the user should have to guess the thread the callback will be on?
from auth0.swift.
Network requests should be handled async as they should never block the main thread. Have a look at URLSession which is what our network layer uses. You will see the completion handler (callback) is scheduled on the delegate queue. So this is standard and expected behaviour, no need for us to document this.
In a callback the developer should only switch to the main thread when it is necessary to do so, typically Ux changes. Otherwise they run the risk of unnecessarily blocking the main thread, which goes against best practice.
from auth0.swift.
Related Issues (20)
- In v2 we can no longer build out our own token request HOT 9
- Login with OTP with custom realm HOT 1
- Custom minTTL support with renew() API HOT 2
- Passwordless authentication does not accept additional parameters HOT 2
- Privacy Manfiest HOT 4
- SWIFT TASK CONTINUATION MISUSE: clearSession(federated:) leaked its continuation! HOT 2
- Auth0 does not support visionOS
- Missing AuthenticationError helper for Revoked tokens
- Auth0 does not support Social Logins for visionOS HOT 1
- isNetworkError does not report case where Wifi + Mobile Data is off HOT 1
- Auth0.webAuth() doesn't work during migration from iOS to VisionOS platform HOT 23
- Auth0 crashes due to swift task continuation misuse HOT 7
- Unable to install latest version. HOT 2
- Privacy manifest HOT 3
- signup func to support setting given_name and family_name HOT 2
- Auth0 podspec for iOS privacy info HOT 1
- Implementing additionalHeaderFields
- Getting "No credentials were found in the store." on production app HOT 2
- getting "No Credentails were found in the store" on production app HOT 1
- What is the correct way to work with CredentialsManager in Swift Concurrency?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auth0.swift.