Skip to content

Commit b9e2bb6

Browse files
authored
docs: add Apple OAuth provider docs (#650)
1 parent 2d23ece commit b9e2bb6

File tree

9 files changed

+58
-0
lines changed

9 files changed

+58
-0
lines changed

docs/provider/oauth/apple.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Apple
3+
description: Add the Apple Sign in OAuth provider to your application.
4+
keywords: [Apple, OAuth, Sign in with Apple]
5+
authors: [People257]
6+
---
7+
8+
To set up the Apple Sign in provider, please go to the [Apple Developer](https://developer.apple.com/account) website. An active **Apple Developer Program membership** is required.
9+
10+
### Step 1: Configure App ID
11+
12+
Create a new App ID or configure an existing one, and ensure **Sign in with Apple** is enabled for it.
13+
14+
![Enable Sign in with Apple for App ID](/img/providers/OAuth/appledashboard.png)
15+
16+
### Step 2: Create a Services ID
17+
18+
Next, create a new identifier, making sure to select the **Services IDs** type. (The `Identifier` you set here will be your **Client ID** in Casdoor).
19+
20+
![Register Services ID](/img/providers/OAuth/appleregisterserviceid.png)
21+
22+
Then, configure this Services ID. Enable **Sign in with Apple** and click **Configure**.
23+
24+
![Edit Services ID Configuration](/img/providers/OAuth/appleeditserviceconfig.png)
25+
26+
### Step 3: Configure Redirect URLs
27+
28+
In the configuration screen, set up the **Return URLs** (callback URLs). You need to enter the **Redirect URL shown on the Casdoor provider page** here.
29+
30+
![Configure Callback URLs](/img/providers/OAuth/applecallbackconfig.png)
31+
32+
:::info Set Return URLs Correctly
33+
The `Return URLs` on Apple **must** exactly match the `Redirect URL` shown on your Casdoor Apple provider configuration page (e.g., `https://your-casdoor-domain.com/callback`).
34+
:::
35+
36+
### Step 4: Create a Key
37+
38+
After configuring the Services ID, create a **Key**.
39+
When creating the Key, enable **Sign in with Apple** and associate it with your App ID.
40+
41+
![Configure Key Association](/img/providers/OAuth/applekeyconfig.png)
42+
43+
After registering the Key, note down the **Key ID** and **download the `.p8` file immediately**. (This file can only be downloaded once, save it securely!)
44+
45+
![Get Key ID and Download .p8 File](/img/providers/OAuth/applegetkeyid.png)
46+
47+
**Important:** Find and note down your **Team ID** from the **Membership** page on the Apple Developer Portal.
48+
49+
### Step 5: Configure Casdoor Provider
50+
51+
1. **Client ID**: Enter the Apple **Services ID `Identifier`** you created earlier.
52+
2. **Team ID**: Enter your Apple **Team ID** (found on the Membership page).
53+
3. **Key ID**: Enter the Apple **Key ID** you noted down.
54+
4. **Key Text**: Open the downloaded `.p8` file with a text editor. Copy its **entire content** (including the `-----BEGIN...` and `-----END...` lines) and paste it here.
55+
5. **Check Redirect URL**: Verify that the `Redirect URL` shown here in Casdoor has been correctly added to the **Return URLs** in your Apple Services ID configuration.
56+
57+
![Configure Casdoor Provider](/img/providers/OAuth/appleconfigcasdoor.png)

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ module.exports = {
169169
"provider/oauth/github",
170170
"provider/oauth/linkedin",
171171
"provider/oauth/facebook",
172+
"provider/oauth/apple",
172173
"provider/oauth/adfs",
173174
"provider/oauth/azureAD",
174175
"provider/oauth/azureADb2c",
61.4 KB
Loading
25.7 KB
Loading
45 KB
Loading
30.8 KB
Loading
42.8 KB
Loading
112 KB
Loading
105 KB
Loading

0 commit comments

Comments
 (0)