Open Closed

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

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)
  • 0
    gterdem created
    Support Team

    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.