From cb8a50ea7c20dcabf428bc9f23a1b38d4ebc3eef Mon Sep 17 00:00:00 2001 From: Marcelo Soares Date: Mon, 19 Jan 2026 22:58:08 -0300 Subject: [PATCH 1/2] docs: Add app configuration section to Apple auth docs --- .../04-providers/03-apple/02-configuration.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/docs/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md b/docs/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md index 0f2fc7e7..e0d883d7 100644 --- a/docs/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md +++ b/docs/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md @@ -19,3 +19,52 @@ pod.configureAppleIdpRoutes( webAuthenticationCallbackRoutePath: '/auth/callback', ); ``` + +### Configuring Apple Sign-In on the App + +Apple Sign-In requires additional configuration for web and Android platforms. On native Apple platforms (iOS/macOS), the configuration is automatically handled by the underlying `sign_in_with_apple` package through Xcode capabilities. + +#### Passing Configuration in Code + +You can pass the configuration directly when initializing the Apple Sign-In service: + +```dart +client.auth.initializeAppleSignIn( + serviceIdentifier: 'com.example.app', + redirectUri: 'https://example.com/auth/callback', +); +``` + +The `serviceIdentifier` is your Apple Services ID (configured in Apple Developer Portal), and the `redirectUri` is the callback URL that Apple will redirect to after authentication (must match the URL configured on the server). + +:::note +These parameters are only required for web and Android platforms. On native Apple platforms (iOS/macOS), they are ignored and the configuration from Xcode capabilities is used instead. +::: + +#### Using Environment Variables + +Alternatively, you can pass configuration during build time using the `--dart-define` option. The Apple Sign-In provider supports the following environment variables: + +- `APPLE_SERVICE_IDENTIFIER`: The Apple Services ID. +- `APPLE_REDIRECT_URI`: The redirect URI for authentication callbacks. + +If `serviceIdentifier` and `redirectUri` values are not supplied when initializing the service, the provider will automatically fetch them from these environment variables. + +**Example usage:** + +```bash +flutter run \ + -d "" \ + --dart-define="APPLE_SERVICE_IDENTIFIER=com.example.app" \ + --dart-define="APPLE_REDIRECT_URI=https://example.com/auth/callback" +``` + +This approach is useful when you need to: + +- Manage configuration separately for different platforms (Android, Web) in a centralized way. +- Avoid committing sensitive configuration to version control. +- Configure different credentials for different build environments (development, staging, production). + +:::tip +You can also set these environment variables in your IDE's run configuration or CI/CD pipeline to avoid passing them manually each time. +::: From 950f468524e9419676f311116a524eb493685341 Mon Sep 17 00:00:00 2001 From: Marcelo Soares Date: Mon, 19 Jan 2026 23:39:26 -0300 Subject: [PATCH 2/2] chore: Copy the addition to other 3.x.x versions --- .../04-providers/03-apple/02-configuration.md | 49 +++++++++++++++++++ .../04-providers/03-apple/02-configuration.md | 49 +++++++++++++++++++ .../04-providers/03-apple/02-configuration.md | 49 +++++++++++++++++++ 3 files changed, 147 insertions(+) diff --git a/versioned_docs/version-3.0.0/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md b/versioned_docs/version-3.0.0/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md index 0f2fc7e7..e0d883d7 100644 --- a/versioned_docs/version-3.0.0/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md +++ b/versioned_docs/version-3.0.0/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md @@ -19,3 +19,52 @@ pod.configureAppleIdpRoutes( webAuthenticationCallbackRoutePath: '/auth/callback', ); ``` + +### Configuring Apple Sign-In on the App + +Apple Sign-In requires additional configuration for web and Android platforms. On native Apple platforms (iOS/macOS), the configuration is automatically handled by the underlying `sign_in_with_apple` package through Xcode capabilities. + +#### Passing Configuration in Code + +You can pass the configuration directly when initializing the Apple Sign-In service: + +```dart +client.auth.initializeAppleSignIn( + serviceIdentifier: 'com.example.app', + redirectUri: 'https://example.com/auth/callback', +); +``` + +The `serviceIdentifier` is your Apple Services ID (configured in Apple Developer Portal), and the `redirectUri` is the callback URL that Apple will redirect to after authentication (must match the URL configured on the server). + +:::note +These parameters are only required for web and Android platforms. On native Apple platforms (iOS/macOS), they are ignored and the configuration from Xcode capabilities is used instead. +::: + +#### Using Environment Variables + +Alternatively, you can pass configuration during build time using the `--dart-define` option. The Apple Sign-In provider supports the following environment variables: + +- `APPLE_SERVICE_IDENTIFIER`: The Apple Services ID. +- `APPLE_REDIRECT_URI`: The redirect URI for authentication callbacks. + +If `serviceIdentifier` and `redirectUri` values are not supplied when initializing the service, the provider will automatically fetch them from these environment variables. + +**Example usage:** + +```bash +flutter run \ + -d "" \ + --dart-define="APPLE_SERVICE_IDENTIFIER=com.example.app" \ + --dart-define="APPLE_REDIRECT_URI=https://example.com/auth/callback" +``` + +This approach is useful when you need to: + +- Manage configuration separately for different platforms (Android, Web) in a centralized way. +- Avoid committing sensitive configuration to version control. +- Configure different credentials for different build environments (development, staging, production). + +:::tip +You can also set these environment variables in your IDE's run configuration or CI/CD pipeline to avoid passing them manually each time. +::: diff --git a/versioned_docs/version-3.1.0/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md b/versioned_docs/version-3.1.0/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md index 0f2fc7e7..e0d883d7 100644 --- a/versioned_docs/version-3.1.0/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md +++ b/versioned_docs/version-3.1.0/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md @@ -19,3 +19,52 @@ pod.configureAppleIdpRoutes( webAuthenticationCallbackRoutePath: '/auth/callback', ); ``` + +### Configuring Apple Sign-In on the App + +Apple Sign-In requires additional configuration for web and Android platforms. On native Apple platforms (iOS/macOS), the configuration is automatically handled by the underlying `sign_in_with_apple` package through Xcode capabilities. + +#### Passing Configuration in Code + +You can pass the configuration directly when initializing the Apple Sign-In service: + +```dart +client.auth.initializeAppleSignIn( + serviceIdentifier: 'com.example.app', + redirectUri: 'https://example.com/auth/callback', +); +``` + +The `serviceIdentifier` is your Apple Services ID (configured in Apple Developer Portal), and the `redirectUri` is the callback URL that Apple will redirect to after authentication (must match the URL configured on the server). + +:::note +These parameters are only required for web and Android platforms. On native Apple platforms (iOS/macOS), they are ignored and the configuration from Xcode capabilities is used instead. +::: + +#### Using Environment Variables + +Alternatively, you can pass configuration during build time using the `--dart-define` option. The Apple Sign-In provider supports the following environment variables: + +- `APPLE_SERVICE_IDENTIFIER`: The Apple Services ID. +- `APPLE_REDIRECT_URI`: The redirect URI for authentication callbacks. + +If `serviceIdentifier` and `redirectUri` values are not supplied when initializing the service, the provider will automatically fetch them from these environment variables. + +**Example usage:** + +```bash +flutter run \ + -d "" \ + --dart-define="APPLE_SERVICE_IDENTIFIER=com.example.app" \ + --dart-define="APPLE_REDIRECT_URI=https://example.com/auth/callback" +``` + +This approach is useful when you need to: + +- Manage configuration separately for different platforms (Android, Web) in a centralized way. +- Avoid committing sensitive configuration to version control. +- Configure different credentials for different build environments (development, staging, production). + +:::tip +You can also set these environment variables in your IDE's run configuration or CI/CD pipeline to avoid passing them manually each time. +::: diff --git a/versioned_docs/version-3.2.0/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md b/versioned_docs/version-3.2.0/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md index 0f2fc7e7..e0d883d7 100644 --- a/versioned_docs/version-3.2.0/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md +++ b/versioned_docs/version-3.2.0/06-concepts/11-authentication/04-providers/03-apple/02-configuration.md @@ -19,3 +19,52 @@ pod.configureAppleIdpRoutes( webAuthenticationCallbackRoutePath: '/auth/callback', ); ``` + +### Configuring Apple Sign-In on the App + +Apple Sign-In requires additional configuration for web and Android platforms. On native Apple platforms (iOS/macOS), the configuration is automatically handled by the underlying `sign_in_with_apple` package through Xcode capabilities. + +#### Passing Configuration in Code + +You can pass the configuration directly when initializing the Apple Sign-In service: + +```dart +client.auth.initializeAppleSignIn( + serviceIdentifier: 'com.example.app', + redirectUri: 'https://example.com/auth/callback', +); +``` + +The `serviceIdentifier` is your Apple Services ID (configured in Apple Developer Portal), and the `redirectUri` is the callback URL that Apple will redirect to after authentication (must match the URL configured on the server). + +:::note +These parameters are only required for web and Android platforms. On native Apple platforms (iOS/macOS), they are ignored and the configuration from Xcode capabilities is used instead. +::: + +#### Using Environment Variables + +Alternatively, you can pass configuration during build time using the `--dart-define` option. The Apple Sign-In provider supports the following environment variables: + +- `APPLE_SERVICE_IDENTIFIER`: The Apple Services ID. +- `APPLE_REDIRECT_URI`: The redirect URI for authentication callbacks. + +If `serviceIdentifier` and `redirectUri` values are not supplied when initializing the service, the provider will automatically fetch them from these environment variables. + +**Example usage:** + +```bash +flutter run \ + -d "" \ + --dart-define="APPLE_SERVICE_IDENTIFIER=com.example.app" \ + --dart-define="APPLE_REDIRECT_URI=https://example.com/auth/callback" +``` + +This approach is useful when you need to: + +- Manage configuration separately for different platforms (Android, Web) in a centralized way. +- Avoid committing sensitive configuration to version control. +- Configure different credentials for different build environments (development, staging, production). + +:::tip +You can also set these environment variables in your IDE's run configuration or CI/CD pipeline to avoid passing them manually each time. +:::