Closed Rigel772 closed 3 years ago
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 contains correct 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:
Authorization Bearer oad098sadTOKEN_HERE
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
x-hasura-admin-secret
Problem solved! The Config var should be set in Hasura not Heroku
Following the documentation for Firebase have set Heroku Config Var:
And sending from Apollo Client Header:
The token contains correct claims:
And still on Hasura API Explorer with selected header :
Authorization Bearer oad098sadTOKEN_HERE
getting error:on client:
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