Skip to content

Apple sign-in mix between id and token #5890

Closed
@SebC99

Description

@SebC99

In #5755, it is said that the authData should be:

{
  "apple": {
    "id": "jwt token for user", // required, used for validation
    "access_token": "an authorized access token for the user", // optional, currently does nothing but maybe in the future
  }
}

whereas the authAdapter's id should be a unique id to recognized the user.
The Apple JWT is always changing since it includes the time and the Apple Public Key, so we have to use the Apple credential.user as the id and the JWT (identityToken) as the token/access_token.
And then, when the server inspects the JWT, we can check if the sub element is equal to the id

In the current version, every login causes a user creation.
I can try to to a PR if you want

(btw, great work for this implementation!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions