Allow async function in PermissionsBuilder to use custom claims
See original GitHub issueIt would be very helpful to be able to pass an async function to PermissionsBuilder
, since user.getIdToken()
returns a promise.
I want to use custom claims for managing permissions and with being able to access the token inside the PermissionsBuilder
I can access the custom claims, as they are passed with the token.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Recommended best practice for role claims as permissions
I use Custom policy based authentication as described in the Microsoft article in ... permissionsBuilder; } protected override async Task ...
Read more >Index (OFBiz trunk API)
Creates a child element with the given name and appends it to the element child node list. addChildElementCDATAValue(Element, String, String, Document) - Static ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome! Happy to know it works for you 😃 I need to add some more examples for these kind of use cases
Hi @davemecha I think it was already possible before, but I have made it a bit easier to add this kind of behaviour in version 0.44.0 You can return a promise in the
NavigationBuilder
, so you could get your user permissions and then save them in theauthController
, which is an internal controller you can get in some callbacks, as well as via a hook, if you have a custom component. I have modified the quickstart example to cover your use case: https://firecms.co/docs/quickstart/ You fetch your data in the navigation builder, save it in theextra
field of theauthController
and then retrieve it in your permissions builder 😃