Skip to content

juheba/collector-app

Repository files navigation

HELP?!

  • Generate Hive Adapter Classes and Smartstruct Mapper with: dart run build_runner build
  • To generate collector-api, visit the collector-contract Repository.
  • To generate l10n files: flutter pub global run intl_utils:generate

Getting started

  • dart run build_runner build
  • dart pub global activate intl_utils activates l10n utilities

Flutter Sample App

This sample app demonstrates the integration of the Auth0 Flutter SDK into a Flutter app. The sample is a companion to the Auth0 Flutter Quickstart.

Requirements

  • Flutter 3+
  • Xcode 14+ (for iOS)
  • Android Studio 4+ (for Android)

Configure Auth0 Application

📱 Mobile

Go to the settings page of your Auth0 application and add the corresponding URL to Allowed Callback URLs and Allowed Logout URLs, according to the app target you want to run. If you are using a custom domain, replace YOUR_AUTH0_DOMAIN with the value of your custom domain instead of the value from the settings page.

Android

SCHEME://YOUR_AUTH0_DOMAIN/android/YOUR_PACKAGE_NAME/callback

iOS

YOUR_BUNDLE_ID://YOUR_AUTH0_DOMAIN/ios/YOUR_BUNDLE_ID/callback

🖥️ Web

Go to the settings page of your Auth0 application and configure the following URLs:

  • Allowed Callback URLs: http://localhost:3000
  • Allowed Logout URLs: http://localhost:3000
  • Allowed Web Origins: http://localhost:3000

Configure Auth0 Flutter

The sample app uses flutter_dotenv for its configuration. Rename .env.example to .env and provide the appropriate domain and Client Id. Optionally, when using Android, you can configure the scheme as well. This can be set to a custom scheme, or https if you want to use Android App Links. You can read more about setting this value in the Auth0.Android SDK README.

AUTH0_DOMAIN={DOMAIN}
AUTH0_CLIENT_ID={CLIENT_ID}
# AUTH0_CUSTOM_SCHEME=SCHEME

Android

In the sample, we are using values referenced from android/app/src/main/res/values/strings.xml. Rename strings.xml.example to strings.xml and fill in the respective values.

  • com_auth0_domain: The domain of your Auth0 tenant. Generally, you can find this in the Auth0 Dashboard under your application's settings in the Domain field. If you are using a custom domain, you should set this to the value of your custom domain instead.
  • com_auth0_scheme: The scheme to use. Can be a custom scheme, or https if you want to use Android App Links. You can read more about setting this value in the Auth0.Android SDK README.

iOS

The sample has already configured the required Url Types to ensure the callback and logout URLs can reach the app, so there is nothing to configure in order to run the sample on iOS.

Run the sample

To run the project, use the Flutter CLI's run command.

📱 Mobile

flutter run

Ensure you have at least one emulator running. If you have multiple running, the CLI will prompt you to select the one to run the app on.

🖥️ Web

flutter run -d chrome --web-port 3000 --web-renderer html

Compile the sample

To compile the project, use the Flutter CLI's build command, including the platform you want to target.

flutter build apk
flutter build ios
flutter build web

Issue Reporting

For general support or usage questions, use the Auth0 Community forums or raise a support ticket. Only raise an issue if you have found a bug or want to request a feature.

Do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

What is Auth0?

Auth0 helps you to:

  • Add authentication with multiple sources, either social identity providers such as Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce (amongst others), or enterprise identity systems like Windows Azure AD, Google Apps, Active Directory, ADFS, or any SAML identity provider.
  • Add authentication through more traditional username/password databases.
  • Add support for linking different user accounts with the same user.
  • Support for generating signed JSON Web Tokens to call your APIs and flow the user identity securely.
  • Analytics of how, when, and where users are logging in.
  • Pull data from other sources and add it to the user profile through JavaScript Actions.

Why Auth0? Because you should save time, be happy, and focus on what really matters: building your product.

License

This project is licensed under Apache License 2.0. See the LICENSE file for more information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages