You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 callingauth.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.
The text was updated successfully, but these errors were encountered: