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

Dynamic Provider Settings Not Refreshing Until IIS Pool Recycle #1537

Open
KhandelwalMayur28 opened this issue Jan 10, 2025 · 1 comment
Open

Comments

@KhandelwalMayur28
Copy link

KhandelwalMayur28 commented Jan 10, 2025

Which version of Duende IdentityServer are you using?
7.0.8

Which version of .NET are you using?
8

Describe the bug
The dynamic provider did not refresh its settings. I accidentally entered the wrong setting in the database, and even after correcting it, the changes didn’t reflect until the IIS pool was recycled.

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior.

  1. Store provider settings with some incorrect data in the DB
  2. Try to login with this provider, so it gives the error (For example - Authority Url has some misspelled.)
  3. Correct data in DB

I’m still unable to log in, even though the GetBySchemeAsync method returns the correct data. The same error persists until I recycle or restart the IIS pool.

Expected behavior

It should work without the need to recycle or restart the IIS pool. Is there something I’m overlooking?

Log output/exception with stacktrace

data

Additional context

Add any other context about the problem here.

@maartenba
Copy link
Collaborator

This sounds like the dynamic providers may be cached (see docs). Can you double check your caching configuration?

If you have caching enabled, you can set the cache timeout in the IdentityServer options:

builder.Services.AddIdentityServer(options => {
    // ...
    options.Caching.IdentityProviderCacheDuration = TimeSpan.FromMinutes(1); // 1 min cache instead of the default 1 hour
    // ...
})
    // ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants