microsoftgraph / microsoftgraph/msgraph-sdk-dotnet-core

Cache keys in ITokenValidableExtension.AreTokensValidAsync

Open
#948 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs: Attention :wave: no-recent-activity type:feature
Dominant language
C#
Stars
164
Forks
65
Avg merge
38m
Merged PRs (30d)
1

Description

Is your feature request related to a problem? Please describe the problem.

Every time I call AreTokensValidAsync, I see two requests to login.microsoftonline.com. One to /common/.well-known/openid-configuration and one to /common/discovery/keys.
I assume these keys don't change very often, so they should be cached.

Describe the solution you'd like.

I would like the keys to be cached, to avoid these two requests being repeated so often.

Additional context?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ITokenValidableExtension.AreTokensValidAsync and reproduce the repeated requests to login.microsoftonline.com for /common/.well-known/openid-configuration and /common/discovery/keys. Determine the existing token-validation flow and its tests, then verify that repeated calls reuse cached keys and avoid repeating those requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
authentication
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.