Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

[FEATURE REQUEST] User Role helper #64

Open
go4cas opened this issue Mar 20, 2021 · 0 comments
Open

[FEATURE REQUEST] User Role helper #64

go4cas opened this issue Mar 20, 2021 · 0 comments

Comments

@go4cas
Copy link

go4cas commented Mar 20, 2021

The current SDK methods include a helper to get the user data (auth.user()). I would be great if we could get something similar for user roles. At present I can get this by calling auth.getClaim('x-hasura-allowed-roles'), but I think a helper would be more inline with the current design?

My use case: extracting user roles on the front-end to guard navigation routes, and show/hide features based on allowed roles.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant