Open Closed

update role to a user doesn't affect until user logouts #4088


User avatar
0
FPT_TuyenDN1 created
  • ABP Framework version: v5.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:" When i update user's role, it not affect until user log out and login again. How I can update user's role and it affect immediately?

1 Answer(s)
  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    Yes, the user roles are added as claim to the access token when a user logs in. So, if you change a user role currently logged in, best you can do is to invalidate the access token to force to re-login.

    To do that, you can use the UserSecurityStamp as explained here.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15