Apple
Configure authentication via Apple in Portabase.
Apple integration (Sign in with Apple) allows your users to sign in via their Apple account, offering a secure and privacy-respecting experience.
Sign in with Apple requires an Apple Developer account (paid program).
Check the OAuth2 configuration to understand global variables and role management.
Configuration Steps
Access Apple Developer Portal
Log in to your account on the Apple Developer Portal.
Create an Identifier (Services ID)
In Certificates, Identifiers & Profiles > Identifiers, create a new Services ID.
- Select the Services IDs type.
- Give a name and a unique identifier (e.g.,
com.your-domain.portabase).
Configure Sign In with Apple
Enable Sign In with Apple for this Services ID and click Configure.
- In Primary App ID, select your primary application or create one.
- In Domains and Subdomains, add your domain (e.g.,
portabase.your-domain.com). - In Return URLs, add:
https://portabase.your-domain.com/api/auth/callback/apple
Create an Authentication Key
In Keys, create a new key.
- Check Sign In with Apple.
- Associate it with the previously created Services ID.
- Download the
.p8file (keep it, it is only downloadable once).
Get Information
Note the following elements:
- Services ID (your Client ID).
- Team ID (visible in your Apple Developer profile).
- Key ID (displayed in your key details).
Generate Client Secret
Apple does not use a static secret but a signed JWT token. Use a script or your pipeline to generate this secret using your .p8 file.
Environment Variables
Add these variables to your configuration:
AUTH_SOCIAL_APPLE_CLIENT="your-apple-services-id"
AUTH_SOCIAL_APPLE_SECRET="your-apple-signed-jwt"
AUTH_SOCIAL_APPLE_APP_BUNDLE_IDENTIFIER="com.your-domain.portabase"Restart the Dashboard
After updating your .env file, restart the instance:
portabase restart .docker-compose down && docker-compose up -d