ancient-dentist-17854
06/02/2025, 10:38 AMbrief-egg-61061
06/02/2025, 10:38 AMbrief-egg-61061
06/02/2025, 10:38 AMjsonnet local claims = { email_verified: false, } + std.extVar('claims'); { identity: { traits: { // Only return the email if it exists and is marked verified by Apple [if 'email' in claims && claims.email_verified then 'email' else null]: claims.email, }, }, }
The key claims you can expect from Apple include: - email: The user's email address (if available) - email_verified: Boolean indicating if the email is verified Apple's ID token, which is the source of these claims, typically only contains the user's email address and its verification status. Additional claims may be present depending on the user's Apple account and the scopes requested, but the above are the primary ones used in Ory's integration. If you need to map these claims to Ory identity traits, you do so via a Jsonnet snippet as shown above, and you can make the mapping conditional based on the presence and verification of the email claim [Webbrowser Apple OIDC mapping](https://www.ory.sh/docs/kratos/social-signin/apple#webbrowser). If you use the Apple SDK on native apps, you may also receive the user's full name as part of the credential, which you can submit as additional traits during registration or login [Apple SDK on native apps](https://www.ory.sh/docs/kratos/social-signin/apple#using-the-apple-sdk-on-native-apps). In summary, the Apple OIDC claims format is a JSON object with at least email and email_verified fields, and optionally name fields if available.ancient-dentist-17854
06/02/2025, 10:41 AMbrief-egg-61061
06/02/2025, 10:41 AMbrief-egg-61061
06/02/2025, 10:41 AMtraits
field in the registration or login flow. Here’s an example from the documentation: typescript traits: { name: { first: credential.fullName?.givenName || "given name", last: credential.fullName?.familyName || "last name", }, }
You include this in your call to updateRegistrationFlow
or updateLoginFlow
along with the id_token
and id_token_nonce
[Apple SDK on native apps](https://www.ory.sh/docs/kratos/social-signin/apple#using-the-apple-sdk-on-native-apps). Summary: - For web flows, you generally cannot get the user's name from Apple OIDC claims—only the email is available. - For native app flows using the Apple SDK, you can obtain the user's name and submit it as part of the identity traits to Ory. If you need the user's name in a web flow, Apple does not provide it via OIDC, and there is no workaround documented in the knowledge sources.