Base solution for your next web application
Open Closed

How to reload user permissions in angular app without a page refresh #11991


User avatar
0
harley.mcphee created

I am trying to prevent having to refresh the page after a user logs in but I am not sure how I can re-initialize the abp library once the user access token is set.

The current issue is that abp.auth.grantedPermissions is empty, I am assuming because abp initializes this on start up. How can I easily re-init abp once a user is logged in without refreshing my app?


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can make a request to AbpUserConfiguration/GetAll endpoint with the access token in the Authorization header and use returned result.auth.grantedPermissions and set it to abp.auth.grantedPermissions