Skip to content

[JS SDK] Client Credentials bearer token is not cached between requests #89

@omerlh

Description

@omerlh

When inspecting the traces of the calls to auth0 in our system, I noticed we make a call to get a token on every request.
After looking at the JS sdk code, I noticed that the credentials are indeed cached in the BaseAPI object, but this property is not used (as far as I can tell).
Every call to `createRequestFunction does not pass the credentials object, so the class is instantiated each time and the token is not cached.

Yes, I am aware that auth0 FGA have a separate SDK, we are using the OSS one to make testing easier.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingjs-sdkAffects the JavaScript SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions