:ory: Get ID token payload in Ory network: We have...
# ory-network
m
ory Get ID token payload in Ory network: We have setup a generic OIDC provider. Is there a way to inspect the payload of the ID token to know exactly how the data looks like and what can be parsed in the data mapping: https://www.ory.sh/docs/kratos/social-signin/generic#data-mapping e.g. some of our B2B partners set a different value in the issuer field and some don’t, for us it’s hard to know as we can’t inspect the ID token (or don’t know how): https://openid.net/specs/openid-connect-basic-1_0.html#:~:text=the%20ID%20Token%3A-,iss,-REQUIRED.%20Issuer%20Identifier
p
Hi @mysterious-processor-51766 You can get the id token by calling the admin identities endpoint for the identity you are mapping. https://www.ory.sh/docs/kratos/social-signin/get-tokens Since we unfortunately do not expose logs currently, an alternative to finding all the claims in the id_token would be to print them all out into a field and leave the other identity traits that are required as empty. This will return you to the registration UI requiring the other fields to be completed. You can then see all the claims in one of trait fields pre-filled.
Copy code
local claims = std.extVar('claims');
local arrayToString(arr) = std.join(", ", std.map(std.escapeStringJson, arr));
local c = arrayToString(std.objectFieldsAll(claims));

{
  identity: {
    traits: {
      email: c,
    },
  },
}
https://www.ory.sh/docs/kratos/social-signin/data-mapping
m
@proud-plumber-24205 pefect, worked like a charm for me 😍
🎉 1