Create a different ways to login using Flutter Riverpod as state management and dependency injection.
- Clone this project.
- If you want to rename the bundles for each platform, you must do the steps below.
- For Android, you must rename the bundle id on
app/build.gradle
. - For iOS in XCode IDE, you select
Runner
and change the 'Bundle Identifier' text.
- For Android, you must rename the bundle id on
- You must follow the instructions for setting each third login in the steps follow this link.
- Run project and enjoy 😄
This scenario recreates of type of conventional login (User / Password) like if you try to connect to a backend or database with the user information and validate if the user and password are corrects.
This scenario recreates a login type with a phone number and receives a push notification with the access code which is a number with 4 digits.
This scenario recreates the local auth login with the use of fingerprint (Android, iOS) or face id (iOS).
This scenario recreates the authentication with third providers like Facebook, Google, Apple and Twitter.
This scenario recreates the authentication using different mechanism like Azure Active Directory B2C and/or Auth0, enabling user/password, third logins, etc.
- If you want to set the GoogleServices files follow this link
- If not, you must set the Google client id on the Info.plist file. Also, set the Dart Define command setting
the additional run arguments below
--dart-define GOOGLE_CLIENT_ID=<YOUR_GOOGLE_CLIENT_ID>
These values you must get on the Google Console.
- You must set the Apple client id and the redirect url as the Dart Define command setting the additional run
arguments below
--dart-define APPLE_CLIENT_ID=<YOUR_APPLE_CLIENT_ID> --dart-define APPLE_REDIRECT_URI=<YOUR_APPLE_REDIRECT_URI>
These values you must get on the Apple Developer Portal. Also, you can follow this link
- You must set the app id and the client token. For android, you must in
the
android/src/main/res/strings.xml
file and for iOS, you must in theios/Runner/Info.plist
file.
These values you must get on the Facebook Developers. Also, you can follow this link for Android and this link for iOS
- You must set the Twitter api key, Twitter api secret and the redirect url in the Dart Define command
setting the additional run arguments below
--dart-define TWITTER_API_KEY=<YOUR_TWITTER_API_KEY> --dart-define TWITTER_API_SECRET=<YOUR_TWITTER_API_SECRET> --dart-define TWITTER_REDIRECT_URI=<YOUR_TWITTER_REDIRECT_URI>
These values you must get on the Twitter Developer. Also, you can follow this link
- You must set the Azure tenant name, tenant id, policy name, client id and the redirect url in the
Dart Define command setting the additional run arguments below
--dart-define AZURE_TENANT_NAME=<YOUR_AZURE_TENANT_NAME> --dart-define AZURE_TENANT_ID=<YOUR_AZURE_TENANT_ID> --dart-define AZURE_POLICY_NAME=<YOUR_AZURE_POLICY_NAME> --dart-define AZURE_CLIENT_ID=<YOUR_AZURE_CLIENT_ID> --dart-define AZURE_REDIRECT_URL=<YOUR_AZURE_REDIRECT_URL>
To get these values, you must follow these links:
- You must set the Auth0 domain and client id in the Dart Define command setting the additional run arguments
below
--dart-define AUTH0_DOMAIN=<YOUR_AUTH0_DOMAIN> --dart-define AUTH0_CLIENT_ID=<YOUR_AUTH0_CLIENT_ID>
You can follow this link to guide:
- Auth0 Flutter (auth0_flutter)
- Flutter Facebook auth (flutter_facebook_auth)
- Flutter local notifications (flutter_local_notifications)
- Flutter app auth (flutter_appauth)
- Formz (formz)
- Freezed annotation (freezed_annotation)
- Go Router (go_router)
- Google fonts (google_fonts)
- Google signIn (google_sign_in)
- Hooks (flutter_hooks)
- Intl (intl)
- Local auth (local_auth)
- Pinput (pinput)
- Riverpod with Hooks (hooks_riverpod)
- Shared preferences (shared_preferences)
- SignIn with Apple (sign_in_with_apple)
- Twitter login (twitter_login)
- Build runner (build_runner)
- Freezed (freezed)
- Very Good Analysis (very_good_analysis)