Open Closed

Add/Update CurrentUser Claims #2720


User avatar
0
viswajwalith created

ABP Framework version: v5.1.3

UI type: MVC

DB provider: EF Core / MongoDB

Tiered (MVC) or Identity Server Separated (Angular): yes / Microservice

How to add/update claims to CurrentUser without using 'ClaimsPrincipalContributor'.

ClaimsPrincipalContributor triggers while user login.

We have a requirement to add/update claims based on our custom logic after user logged in. We are adding claims to identity but it is not updating in CurrentUser. Is there any possibility to refresh user to update claims in CurrentUser, or is there any other possibility to get claims added to identity from AppService/Web


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Is there any possibility to refresh user to update claims in CurrentUser

    This seems impossible, you can consider accessing these dynamic values in the cache

  • User Avatar
    0
    viswajwalith created

    hi

    Is there any possibility to refresh user to update claims in CurrentUser

    This seems impossible, you can consider accessing these dynamic values in the cache

    Thanks for the update.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35