Only works for v1.0.7 and after
01. You will need to add apple sign in for your app in app store.
02. Open project/ios folder in XCode.
03. Click on “Runner“-> “Signing & Capabilities“-> “+ Capability“. Select “Sign in with Apple” and enter.
![](https://docs.xgenious.com/wp-content/uploads/2023/11/image-36.png)
04. Go to https://developer.apple.com/account/resources/authkeys/list and click on plus icon.
![](https://docs.xgenious.com/wp-content/uploads/2023/11/image-44-1024x267.png)
05. Provide a name, check the Sign in with apple apple option then click “Configure“. In “Configure
” select your app id then click “Save“. Then Click “Continue” in the register a new key page.
![](https://docs.xgenious.com/wp-content/uploads/2023/11/image-45-1024x622.png)
![](https://docs.xgenious.com/wp-content/uploads/2023/11/image-46-1024x412.png)
06. Click on the key you just created
![](https://docs.xgenious.com/wp-content/uploads/2023/11/image-47-1024x294.png)
07. We will need the key id later
![](https://docs.xgenious.com/wp-content/uploads/2023/11/image-48-1024x408.png)
08. Go to https://jwt.io provide the info according to below then copy the encoded key from the left side.
In Header:
{
"alg": "HS256",
"typ": "JWT",
"kid": "Your Key ID"
}
In Payload:
{
"iss": "Your 10-character Team ID associated with your developer account",
"iat": 20231011345,
"exp": 31536000,
"aud": "https://appleid.apple.com",
"sub": "App ID"
}
in iat: your project creation date in UTC
in exp: Expiration date for this JWT in seconds. Exp: if its six months then 15777000 seconds
![](https://docs.xgenious.com/wp-content/uploads/2023/11/image-49-1024x632.png)
09. Open project/lib/view/utils/others_helper.dart and provide the JWT in as the client secret.
![](https://docs.xgenious.com/wp-content/uploads/2023/11/image-50-1024x273.png)
10. You should be able to use Apple Sign-In now and on account deletion the user’s apple id should get revoked.