Cannot set up role based access to data... Following the documentation for Firebase have set Heroku Config Var:
{
"type":"RS256",
"jwk_url": "https://www.googleapis.com/service_accounts/v1/jwk/securetoken@system.gserviceaccount.com",
"audience": "geosystem-2021",
"issuer": "https://securetoken.google.com/geosystem-2021"
}
And sending from Apollo Client Header:
'Authorization': `Bearer ${token}`
The token checked on https://jwt.io/
contains claims:
"https://hasura.io/jwt/claims": {
"x-hasura-default-role": "biuro",
"x-hasura-allowed-roles": [
"biuro"
],
"x-hasura-user-id": "ytBVYInCbCghON3Xv4gXUq9iXsn1"
},
And still on Hasura API Explorer with selected header: Authorization Bearer oad098sadTOKEN_HERE
getting error:
x-hasura-admin-secret/x-hasura-access-key required, but not found
on client:
Unhandled Rejection (Error): x-hasura-admin-secret/x-hasura-access-key required, but not found
With x-hasura-admin-secret
everything is working fine but all tables are available, not the ones meant for my user role... What am I missing? Thanks
The problem was related to wrong configuration in Hasura-Heroku panel.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.