KNowledgeOnWebScale / solid-authentication-browser-extension

10 stars 1 forks source link

"Wear out" access tokens instead of making new ones every request #6

Open axellorreyne opened 1 year ago

axellorreyne commented 1 year ago

At this time, the extension will create a new access token every request using the client's id and secret generated from their login credentials.

Also at this time, the extension will catch any request made by the browser and try and alter it's headers. To prevent catching it's own access token request and therefore creating an infinite loop, I added the following to the listener: https://github.com/KNowledgeOnWebScale/solid-authentication-browser-extension/blob/f0f2c83a649f313b020b8f8ba69da7223d4b7c61/src/js/background.js#L22-L25

The extension should instead wear out these temporary access tokens by storing them, checking their validity on requests and creating a new one when necessary.