Skip to content

VishruthVS/FlutterAuthentication

Repository files navigation

Flutter Firebase Authentication

This Flutter project demonstrates how to implement user authentication using Firebase. Firebase offers a powerful and secure way to manage user authentication in your Flutter apps. In this project, we'll walk you through the steps to set up Firebase Authentication, along with a basic Flutter app that allows users to sign up, sign in, and sign out.

Prerequisites

Before you begin, make sure you have the following installed:

Getting Started

  1. Clone the repository

    git clone https://github.com/yourusername/flutter-firebase-authentication.git
  2. Navigate to the project folder

    cd flutter-firebase-authentication
  3. Install dependencies

    flutter pub get
  4. Create a Firebase project

    • Visit the Firebase Console.
    • Click on "Add project" or select an existing project.
  5. Set up your app in Firebase

    • Add an app to your project by clicking on the Android or iOS icon (whichever is applicable).
    • Follow the on-screen instructions to register your app with Firebase.
  6. Add Firebase configuration files

    • Download the google-services.json file (for Android) or GoogleService-Info.plist file (for iOS) from the Firebase Console.
    • Place these files in the respective platform directories (android/app and ios/Runner).
  7. Configure Firebase Authentication

    • In the Firebase Console, go to "Authentication" and enable the desired sign-in methods (e.g., Email/Password, Google, etc.).
  8. Update Firebase configuration in your Flutter app

    • Open the lib/config/firebase_config.dart file.
    • Replace the apiKey, authDomain, projectId, storageBucket, and messagingSenderId with your Firebase project configuration.
  9. Run the app

    flutter run
  10. Sign up and Sign in

    • Open the app and create a new account or sign in using your email and password.
  11. Sign out

    • You can sign out by clicking the "Sign Out" button.

Folder Structure

  • /lib contains the Flutter code for the authentication app.
  • /lib/config holds the Firebase configuration.

Resources

License

This project is open-source and available under the MIT License.

Feel free to adapt and expand this README to suit your specific project's needs. Ensure you update the paths, filenames, and other details to match your actual project structure.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published