Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnBehalfOfTokenProvider does not cache token - requires UseSharedCache #1380

Open
1 task done
hazzinator1 opened this issue Feb 5, 2024 · 0 comments
Open
1 task done
Labels
area: authentication Authentication related

Comments

@hazzinator1
Copy link

hazzinator1 commented Feb 5, 2024

Category

  • Feature request

Describe the feature

There is no way of adding:

.WithCacheOptions(new CacheOptions()
{
  UseSharedCache = true
})

to the ConfidentialClientApplication inside of OnBehalfOfAuthenticationProvider. The way our .NET Core API works is that we end up creating a new OnBehalfOfAuthenticationProvider per request, so without this extension the token swap will not cache and has to be repeated with every request.

Describe the solution you'd like

Basically just providing some way of providing this boolean into the constructor arguments of OnBehalfOfAuthenticationProvider as a very basic solution. I'm open to other suggestions.

@jansenbe jansenbe added the area: authentication Authentication related label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: authentication Authentication related
Projects
None yet
Development

No branches or pull requests

2 participants