DEV Community

Discussion on: Self Hosted Hasura + GoTrue = ❤️

Collapse
 
robinmobin profile image
RobinGlub

Starting with Hasura v1.3.3 you can actually specify a claims-map config for this use-case.

"claims_map": {
  "x-hasura-allowed-roles": {
    "default": ["user", "vendor"]
  },
  "x-hasura-default-role": {
    "default":"user"
  },
  "x-hasura-user-id": {
     "path":"$.email"
  }
}
Enter fullscreen mode Exit fullscreen mode

Would using this config without modifying GoTrue have the same effect?

Collapse
 
mikeck profile image
Mike CK

Aha... This is very neat. I had not looked at this part of the documentation. Thanks a lot!