Force Identity Server child application to refresh claims

Viewed 201

I have a parent web application which uses identity server to authenticate users across a suite of other web applications which act as children of that parent app.

We utilize a profile service within the parent application to set user claims which can be used with the child application. This profile service is registered with Identity Server on startup by using IdentityServerBuilderExtensionsAdditional.AddProfileService.

Within the user claims we store some user preferences for easy access within our child applications. Recently we added functionality within the parent application to allow users to directly update these preferences.

Unfortunately these updates do not seem to apply until the user's token is refreshed. This can be up to 5 minutes. There doesn’t seem to be any way for me to broadcast to the child applications that something has changed within the parent.

How can I, within the parent application, force the child applications to refresh their claims by making them call that user profile service?


I have tried logging the user out then back in e.g.

await SignOut();
await SignIn(user, rememberMe);

Interestingly this actually seems to work locally on my development machine, but once deployed to production environments this does not work. But I have not been able to determine any difference between my configuration and the production configuration. So, I am looking for a more robust way to force child apps to call this user profile service early.

0 Answers
Related