Hey all! I’m still struggling a bit with the jsonn...
# ory-network
p
Hey all! I’m still struggling a bit with the jsonnet mappings for external SSO providers. If I get a
profile
back from Google with
claims.given_name
and a nested
name: {first, last}
identity schema, how do I assign the values across? I tried
name.first: claims.given_name
but that does not seem to parse as jsonnet correctly…
b
Something like this should work:
Copy code
local claims = std.extVar('claims');
{
  identity: {
    traits: {
      name: {
        first: ...,
        last: ...,
      },
    },
  },
}
In the end, jsonnet produces a Json document so the structure is quite similar to just plain old Json.
p
p
Thanks! This doesn’t mention the nested format which had me confused, but of course @bland-eye-99092 advice works 🙂