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.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on June 23, 2025, 11:58