diff --git a/.github/workflows/firebase_deep_link_client.yaml b/.github/workflows/app_links_deep_link_client.yaml similarity index 62% rename from .github/workflows/firebase_deep_link_client.yaml rename to .github/workflows/app_links_deep_link_client.yaml index 4334ceff0..97221f462 100644 --- a/.github/workflows/firebase_deep_link_client.yaml +++ b/.github/workflows/app_links_deep_link_client.yaml @@ -1,4 +1,4 @@ -name: firebase_deep_link_client +name: app_links_deep_link_client concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -7,8 +7,8 @@ concurrency: on: pull_request: paths: - - "flutter_news_example/packages/deep_link_client/firebase_deep_link_client/**" - - ".github/workflows/firebase_deep_link_client.yaml" + - "flutter_news_example/packages/deep_link_client/app_links_deep_link_client/**" + - ".github/workflows/app_links_deep_link_client.yaml" branches: - main @@ -17,4 +17,4 @@ jobs: uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 with: flutter_version: 3.38.3 - working_directory: flutter_news_example/packages/deep_link_client/firebase_deep_link_client + working_directory: flutter_news_example/packages/deep_link_client/app_links_deep_link_client diff --git a/docs/docs/flutter_development/authentication.md b/docs/docs/flutter_development/authentication.md index d674d0156..c6942f148 100644 --- a/docs/docs/flutter_development/authentication.md +++ b/docs/docs/flutter_development/authentication.md @@ -19,7 +19,7 @@ The package depends on the third-party packages that expose authentication metho To enable authentication, configure each authentication method: -- For email login, enable the **Email/password sign-in provider** in the Firebase Console of your project. In the same section, enable the **Email link sign-in method**. On the dynamic links page, set up a new dynamic link URL prefix (for example, `yourApplicationName.page.link`) with a dynamic link URL of "/email_login". +- For email login, enable the **Email/password sign-in provider** in the Firebase Console of your project. In the same section, enable the **Email link sign-in method**. You will also need to configure deep links for your app - see the [deep link configuration](/project_configuration/social_authentication#deep-link-configuration) section for details. - For Google login, enable the **Google sign-in provider** in the Firebase Console of your project. You might need to generate a `SHA1` key for use with Android. - For Apple login, [configure sign-in with Apple](https://firebase.google.com/docs/auth/ios/apple#configure-sign-in-with-apple) in the Apple's developer portal and [enable the **Apple sign-in provider**](https://firebase.google.com/docs/auth/ios/apple#enable-apple-as-a-sign-in-provider) in the Firebase Console of your project. - For Twitter login, register an app in the Twitter developer portal and enable the **Twitter sign-in provider** in the Firebase Console of your project. diff --git a/docs/docs/project_configuration/social_authentication.md b/docs/docs/project_configuration/social_authentication.md index 4ced93d31..f3fd5936b 100644 --- a/docs/docs/project_configuration/social_authentication.md +++ b/docs/docs/project_configuration/social_authentication.md @@ -21,11 +21,23 @@ Passwordless authentication with an email link requires additional configuration ::: -Once the email authentication method is set up, go to **Firebase -> Engage -> Dynamic links**. Set up a new dynamic link URL prefix (for example, yourApplicationName.page.link) with a dynamic link URL of "/email_login". +### Deep link configuration -Once the dynamic link is set up, replace the placeholder value for **FLAVOR_DEEP_LINK_DOMAIN** inside the `launch.json` file with the **dynamic link URL prefix** you just created. This enviroment variable will be used inside `firebase_authentication_client.dart` to generate the dynamic link URL that will be sent to the user. +The toolkit uses [App Links](https://developer.android.com/training/app-links) (Android) and [Universal Links](https://developer.apple.com/ios/universal-links/) (iOS) for deep linking. To set up deep links for your app: -In addition, replace the placeholder value for every **FLAVOR_DEEP_LINK_DOMAIN** key within your `project.pbxproj` file with the dynamic link URL prefix you just created. +1. **Choose a domain you control** (e.g., `links.yourapp.com`) where you can host verification files. + +2. **Host the verification files** on your domain: + - **Android**: Host `/.well-known/assetlinks.json` - see [Android App Links documentation](https://developer.android.com/training/app-links/verify-android-applinks) + - **iOS**: Host `/.well-known/apple-app-site-association` - see [Universal Links documentation](https://developer.apple.com/documentation/xcode/supporting-universal-links-in-your-app) + +3. **Update the configuration** by replacing the placeholder value `your-domain.com` for **FLAVOR_DEEP_LINK_DOMAIN** in the following files: + - `launch.json` (VS Code) + - `.idea/runConfigurations/development.xml` and `production.xml` (IntelliJ/Android Studio) + - `android/app/src/development/res/values/strings.xml` + - `ios/Runner.xcodeproj/project.pbxproj` + +For more details on setting up deep links in Flutter, see the [Flutter deep linking documentation](https://docs.flutter.dev/ui/navigation/deep-linking). ## Google diff --git a/flutter_news_example/.idea/runConfigurations/development.xml b/flutter_news_example/.idea/runConfigurations/development.xml index 37a4907b9..640856747 100644 --- a/flutter_news_example/.idea/runConfigurations/development.xml +++ b/flutter_news_example/.idea/runConfigurations/development.xml @@ -1,6 +1,6 @@ -