Een ongestructureerde verzameling van artikelen, gedachten en ervaringen.
Voor (niet alleen) web ontwikkelaars is Linux al geruime tijd een serieus alternatief voor Windows of MacOS. Gedurende de afgelopen jaren is dat alleen maar meer het geval.
Recently I was asked to create an integration with the use of an API. This API used OAuth for authentication. After a successful login, the API token and refresh token are returned. You know, as you would expect these days. After the token expires, you'll need to request a new token using the refresh token. Then, you need to use the freshly retrieved token for the next API requests until, of course that token will expire as well. Now, since I'm not the talker let alone the writer. I'll get straight to the point. You could send that request for a new token after the first 403 response. But with the Axios library you can also use interceptors. An example using such an interceptor can be found below. I'm using Redis to store the token and refresh token received from the API as you can see in the examples. Obvious code is omitted and simplified where applicable.
Social media zijn handig, maar ze vormen geen stevig fundament. Ontdek waarom een eigen website onmisbaar is voor iedere ondernemer die online serieus genomen wil worden.
Een website is nooit écht af. In dit artikel lees je waarom regelmatig onderhoud essentieel is voor veiligheid, snelheid en vindbaarheid.