Comments (6)
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.
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.
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.
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.
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)
- TotalToPay on invoice HOT 4
- No active license for desired scope HOT 2
- Voucher ReferenceType missing enum value 'RECEIPT' HOT 3
- Total, TotalVAT and OrderReference are read only property in Invoice entity HOT 2
- Customer References HOT 7
- No SIE Import API since 3.0.0 HOT 2
- Search order by YourOrderNumber HOT 3
- Search for new payments HOT 1
- Language is missing in Order and Offert HOT 1
- CurrencySearch should not have LastModified as search parameter HOT 2
- version history HOT 1
- Casting issue in Invoice-entity HOT 7
- More Sources for payments
- Add WebshopArticle to ArticleSearch HOT 1
- How to check for the expiry of the RefreshToken? HOT 2
- EmploymentForm SVT missing in SDK HOT 5
- RateLimiter not working when auth is controlled by DelegatingHandler HOT 3
- TaxReductionAmounts in Green Technology HOT 1
- Employee Creation returns Object cannot be Null HOT 7
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 csharp-api-sdk.