How can I refresh the access token manually to acquire new claims that have been added and how can these be shown when calling the '/bff/user' endpoint?
To Reproduce
Login
Add some claim to user store
refresh access token
call /bff/user endpoint
Expected behavior
/bff/user endpoint show new claim
Log output/exception with stacktrace
Additional context
In my application the signup flow is as follows
User creates an account and is provided with basic scopes, they will now need an organisation in order to use the application.
User completes organisation registration and they are assigned an organisation Id, this Id is translated into a claim by a custom implementation of IProfileService.
Upon organisation registration the users access token is refreshed in order to get the claim containing the organisation Id without the user needing to sign out and back in again.
the final point here is what I am yet to fully achieve.
I have copied some code from the internals of Duende BFF to refresh the access token however upon accessing the /bff/user endpoint im not able to see the claim in my SPA. if I log out and in again it is visible.
Which version of Duende BFF are you using?
2.2.0
Which version of .NET are you using?
8.0
Describe the bug
How can I refresh the access token manually to acquire new claims that have been added and how can these be shown when calling the '/bff/user' endpoint?
To Reproduce
Expected behavior
/bff/user endpoint show new claim
Log output/exception with stacktrace
Additional context
In my application the signup flow is as follows
the final point here is what I am yet to fully achieve. I have copied some code from the internals of Duende BFF to refresh the access token however upon accessing the /bff/user endpoint im not able to see the claim in my SPA. if I log out and in again it is visible.