Skip to content

chore: added docs for Apple to demonstrate usage of name scope #2235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/kratos/social-signin/30_apple.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Follow these steps to add Apple as a social sign-in provider to your project usi
Copy the **Key ID**.
- Private Key: Paste the contents of the downloaded files into the field in the Ory Console.
6. In the **Scopes** field of the form in the Ory Console, add the following scope:
- `email`
- `email name`
7. Copy the following details from your registered application in Apple to the corresponding fields in the Ory Console form:
- **Apple Team Id**
- **Apple Private Key Id**
Expand All @@ -88,6 +88,8 @@ Follow these steps to add Apple as a social sign-in provider to your project usi
// Therefore we only return the email if it (a) exists and (b) is marked verified
// by Apple.
[if 'email' in claims && claims.email_verified then 'email' else null]: claims.email,
[if 'given_name' in claims then 'firstName' else null]: claims.given_name,
[if 'last_name' in claims then 'lastName' else null]: claims.last_name,
Comment on lines +91 to +92
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only works if the identity schema accepts "firstName", which the default (preset://email) doesn't, maybe we need to make that clear here? E.g. with multiple tabs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aah yes good point.

},
},
}
Expand Down Expand Up @@ -138,6 +140,8 @@ Follow these steps to add Apple as a social sign-in provider to your project usi
// Therefore we only return the email if it (a) exists and (b) is marked verified
// by Apple.
[if 'email' in claims && claims.email_verified then 'email' else null]: claims.email,
[if 'given_name' in claims then 'firstName' else null]: claims.given_name,
[if 'last_name' in claims then 'lastName' else null]: claims.last_name,
},
},
}
Expand Down
Loading