Apple Authentication
To use Apple sign in, you need a client ID and client secret. You can get them from the Apple Developer Portal. You will need an active Apple Developer account to access the developer portal and generate these credentials. Follow these steps to set up your App ID, Service ID, and generate the key needed for your client secret:
1. Apple Developer Setup
Log in to Apple Developer
Go to the Apple Developer Portal and sign in with your Apple Developer credentials.
Create an App ID
- Go to Certificates, Identifiers & Profiles → Identifiers.
- Go to the Identifiers tab.
- Click the + icon next to Identifiers.
- Select App IDs, then click Continue.
- Select App as the type, then click Continue.
Description: Enter a name for your app (e.g., "My Awesome App"). This name may be displayed to users when they sign in.
Bundle ID: Set a bundle ID. The recommended format is a reverse domain name (e.g., com.yourcompany.yourapp). Using a suffix like .ai (for app identifier) can help with organization but is not required (e.g., com.yourcompany.yourapp.ai).
- Scroll down to Capabilities, enable Sign in with Apple, then click Continue → Register.
Create a Service ID (Client ID):
- Go to "Identifiers" in the Apple Developer Portal.
- Register a new identifier for Service IDs
- Click Continue, then Save.
Find the Service ID you just created in the Identifiers list and click on it. Check the Sign In with Apple capability, then click Configure.
Create a Key (download .p8
file)
- Go to Certificates, Identifiers & Profiles → Keys.
- Click the + icon to create a new key.
- Enable Sign in with Apple, then click Continue → Register.
- Download the file
AuthKey_XXXXXXXXXX.p8
(Apple only allows one-time download). - Note your Key ID (from the portal) and Team ID (from your Apple Developer account).
Generate Client Secret (for OAuth flow)
- Open applekeygen.expo.app.
Fill in the required fields:
- Team ID (from Apple Developer)
- Key ID (from the key you created)
- Client ID = your Service ID (e.g.
com.nativelaunch.app.web
) - Private Key = contents of
AuthKey_XXXXXXXXXX.p8
- Click Generate → you will get a client_secret (JWT).
- Copy this secret into Supabase → Authentication → Providers → Apple → Secret.
Client secrets expire every 6 months — you must regenerate them before they expire.
2. Supabase Setup
Enable Apple Provider in Supabase
- Go to your Supabase Dashboard
- Navigate to Authentication → Providers
- Enable the Apple provider
Configure Apple Provider
- Client ID: your Service ID (e.g.
com.nativelaunch.app.web
) - Client Secret: paste the generated JWT (from applekeygen.expo.app)
- Save changes.