Giter VIP home page Giter VIP logo

Comments (6)

richardrandak avatar richardrandak commented on June 29, 2024

Hello! As far as I know, the only way to have automated integrations is to handle token refresh periodically. The initial setup must be done interactively.
So, one time setup with user and then automated connection by using refresh token to keep it alive.

from csharp-api-sdk.

KeenFann avatar KeenFann commented on June 29, 2024

Thanks for the response!

The method you're suggesting feels kinda unusual, would it be possible for you post an example in the readme or a sample project for this flow?

from csharp-api-sdk.

sblomstrand avatar sblomstrand commented on June 29, 2024

This does not feel like a viable solution in server-to-server scenarios.
Is there not a client credentials flow to retrieve auth-tokens using clientId and clientSecret?

from csharp-api-sdk.

xpagedeveloper avatar xpagedeveloper commented on June 29, 2024

The new Auth flow is that you always need start with a user interaction and authorization.
After that you have an auth token and a refresh token. The refresh token is used to get a new auth token and a new refreshtoken.
You need to do this refresh at least with a 30 day interval, I use 20 days in our applications.
You will need to have some kind of single thread update function so you don't loose or mixup the refreshtoken because if you do. You will need to restart the initial auth flow with a user involved.

from csharp-api-sdk.

sblomstrand avatar sblomstrand commented on June 29, 2024

That would work if there is only one application accessing the token. In a distributed environment where several applications access the same token and simultaneously need to refresh that token we would need to implement a distributed lock on the refresh in order to not have a race condition. Or am i mistaken?

from csharp-api-sdk.

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.