From 199d6ab5146a594fc50120a927328e6e046521f1 Mon Sep 17 00:00:00 2001 From: SebC Date: Thu, 8 Aug 2019 08:44:42 +0200 Subject: [PATCH] Update apple sign in documentation --- _includes/parse-server/third-party-auth.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/_includes/parse-server/third-party-auth.md b/_includes/parse-server/third-party-auth.md index e9fbba036..b3b3a0ab0 100644 --- a/_includes/parse-server/third-party-auth.md +++ b/_includes/parse-server/third-party-auth.md @@ -128,12 +128,15 @@ As of Parse Server 3.5.0 you can use [Sign In With Apple](https://developer.appl ```js { "apple": { - "id": "jwt token for user", // required, used for validation - "access_token": "an authorized access token for the user", // optional + "id": "user", + "token": "the identity token for the user" } } ``` +Using Apple Sign In on a iOS device will give you a `ASAuthorizationAppleIDCredential.user` string for the user identifier, which can be match the `sub` component of the JWT identity token. +Using Apple Sign In through the Apple JS SDK or through the REST service will only give you the JWT identity token (`id_token`) which you'll have to decompose to obtain the user identifier in its `sub` component. As an example you could use something like `JSON.parse(atob(token.split(".")[1])).sub`. + #### Configuring parse-server for Sign In with Apple ```js