Skip to content

Commit

Permalink
Update apple sign in documentation (#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
SebC99 authored and TomWFox committed Aug 31, 2019
1 parent 11dcc52 commit c3c825d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions _includes/parse-server/third-party-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c3c825d

Please sign in to comment.