You will need to create an Apple Developer account, and generate an Apple Services ID, Apple Private Key, Apple Team ID, and Apple Key ID.
Integration Steps
1
Create an Apple App ID and Services ID
- Log in to the Apple Developer Portal.
- Navigate to Certificates, IDs & Profiles.
- In the sidebar, select Identifiers and click the ”+” button to register a new identifier.
- Select App IDs and click Continue.
- Select App as the type and click Continue.
- Give your app a description and a Bundle ID (e.g., com.yourdomain.app).
- Scroll down and enable Sign in with Apple, then click Continue, then Register.
- In the top-right of the Identifiers page, switch to Services IDs.
- Click the ”+” button to create a new Service ID and click Continue.
- Give it a description and an identifier (note: this cannot be the same as your App ID’s bundle ID).
- Click Continue, then Register.
- From the list, select your new Service ID.
- Enable Sign in with Apple by checking the box.
- Click Configure next to Sign in with Apple.
- Register your domains (add api.hexclave.com).
- Add the return URL:
https://api.hexclave.com/api/v1/auth/oauth/callback/apple - Click Done, then Continue, and then Save.
2
Create a Private Key
- In the sidebar, select Keys and click the ”+” button.
- Give your key a name and usage description.
- Scroll down to enable Sign in with Apple and click Configure.
- Select your Primary App ID that you created earlier and click Save.
- Click Continue, then Register.
- On the next page, download your key file (.p8). This is critical as you won’t be able to download it again.
- Note your Key ID displayed on this page.
- Click Done.
- Find your Account ID at the very top-right of the Apple Developer Portal page.
3
Configure Key-Based Credentials (Recommended)
In the Apple provider dialog, choose the Automatic (Recommended) tab. Hexclave mints a short-lived client secret at token-exchange time from your Apple credentials. Enter:- Team ID: Your Apple Developer account ID found at the top-right of the portal
- Key ID: The ID of the private key you just created
- Private key: The contents of the
.p8file you downloaded
.p8 contents private.4
Enable Apple OAuth in Hexclave
- On the Hexclave dashboard, select Auth Methods in the left sidebar.
- Click Add SSO Providers and select Apple as the provider.
- Set the Service ID (Client ID) to your Services ID identifier, then choose the Automatic (Recommended) tab and enter the Team ID, Key ID, and
.p8private key contents.
5
Legacy: Static Client Secret
Apple also supports a manually generated client-secret JWT. In the Apple provider dialog, choose the Client secret (Legacy) tab. This is retained for existing integrations, but is less convenient because it expires (Apple allows a maximum lifetime of six months) and must be rotated manually. Enter it in Client Secret instead of the key-based credentials.Saving on this tab clears any stored Team ID, Key ID, and private key.Native App Configuration (iOS/macOS)
Native iOS and macOS apps using the Hexclave Swift SDK require Bundle ID configuration in addition to the web OAuth setup above. Native apps use Apple’s native Sign in with Apple flow (ASAuthorizationController) instead of web-based OAuth.
Bundle IDs are only required for native iOS/macOS apps. Web applications only need the Service ID configuration described above.
Add Your Bundle IDs
- On the Hexclave dashboard, navigate to Auth Methods and select your Apple provider.
- In the Apple configuration modal, add your app’s Bundle ID (e.g.,
com.yourdomain.app). This is the same Bundle ID from your App ID in Apple Developer Portal (Step 1 above). - If you have multiple apps (e.g., separate iOS and macOS apps), add all their Bundle IDs.
- Click Save.
signInWithOAuth(provider: "apple") from the Swift SDK.
Need More Help?
- Check the Sign in with Apple Documentation
- Join our Discord