Giter VIP home page Giter VIP logo

Comments (5)

Widcket avatar Widcket commented on August 11, 2024

Hi @MysticMedia, an internet connection is required to log in. Once the user is logged in, you can store the credentials in your app and then on launch use the expiration timestamp to check if they're still valid. If the credentials are still valid, then you don't need to perform login again. This step does not require an internet connection.

Once the credentials expire, you can use the refresh token (use the offline_access scope to get one) to get new credentials and keep the user logged in.

Please check out the Auth0.swift User Sessions QuickStart to learn more. Does that help?

from lock.swift.

MysticMedia avatar MysticMedia commented on August 11, 2024

from lock.swift.

MysticMedia avatar MysticMedia commented on August 11, 2024

Here is some additional info.

After checking token expiry with function "credentialsManager.hasValid()", we are fetching current user's credentials using SDK's function

credentialsManager.credentials { error, credentials in
guard error == nil, let credentials = credentials else {
return callback(error)
}
self.credentials = credentials
callback(nil)
}

in this function it tries to connect to Internet and goes into loop.

from lock.swift.

Widcket avatar Widcket commented on August 11, 2024

@MysticMedia can you provide a video of the loop you're talking about? If the SDK can't reach Auth0's servers, then the data task should fail with an error.

Also, the request will only take place if the credentials have expired. What is your use case for wanting expired credentials?

from lock.swift.

Widcket avatar Widcket commented on August 11, 2024

Closing due to inactivity.

from lock.swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.