Descope's Flutter Sample App CI

Welcome to Descope's Flutter Sample App, a demonstration of how to integrate Descope for user authentication within a Flutter application. By exploring this project, you can understand how Descope works with Flutter to manage different authentication flows.

Features

This sample app includes:

  • App Client: An example of how the client communicates with Descope.
  • Flows: Demonstrations of various authentication flows supported by Descope.

Getting Started

Follow these steps to run the sample app and explore Descope's capabilities with Flutter:

Prerequisites

Make sure you have the following installed:

  • A code editor such as Visual Studio Code, IntelliJ, or others.

Run the app

  1. Clone the Repository: Clone this repository to your local machine.
  2. Open the Project: Open the project within VS Code or your IDE of choice.
  3. Add your Descope Project ID: Within the root directory of the project, create a .env file. Add your Descope Project ID, which can be found in your Descope Console.
DESCOPE_PROJECT_ID=<your_descope_project_id>
  1. (Optional) Self-Host Your Flow: Your Descope authentication flow is automatically hosted by Descope at https://auth.descope.io/<your_descope_project_id> but you can use your own domain as host per the instructions in our docs. Then, just store your self-hosted flow url in the .env:
DESCOPE_FLOW_URL=<your_descope_flow_url>
  1. (Android Only) Add deep link and host urls: Follow the steps here to get your deep link and host urls, which you'll store in the .env and AndroidManifest.xml respectively. You'll also need to self-host your flow and set it as described in Step 4.
// .env

DESCOPE_DEEP_LINK_URL=<your_descope_deep_link_url>
// android/app/src/main/AndroidManifest.xml

<data android:scheme="https" android:host="<YOUR_HOST_HERE>" android:path="/auth" />
  1. Navigate to Project Directory: Change your current directory to the project's root directory.
cd flutter-sample-app/
  1. Install Dependencies and Run the Application: Retrieve all the required packages and start the application using the following commands:
flutter pub get
flutter run

Learn More

To learn more please see the Descope Documentation and API reference page.

Contact Us

If you need help you can contact us

License

The Flutter Sample App is licensed for use under the terms and conditions of the MIT license Agreement.