Giter VIP home page Giter VIP logo

login-registration-auth-form's Introduction

Login/Registration Form with Firebase Authentication

This project is a login and registration form built with React and Vite. It uses Firebase for authentication (email/password and Google Sign-In) and Firestore to store user information. The form is styled using Tailwind CSS.

Table of Contents

Features

  • User registration with email, password, and additional user information (username).
  • User login with email and password.
  • Google Sign-In pop-out for quick authentication.
  • Form validation using React state hooks and regex.
  • Secure storage of user information in Firestore.
  • Responsive design using Tailwind CSS.

Installation

To get started with this project, clone the repository and install the necessary dependencies.

git clone https://github.com/yourusername/your-repo.git
cd your-repo
npm install

Setup Firebase

  1. Go to the Firebase Console and create a new project.
  2. Enable Authentication:
  • Go to the Authentication section and enable Email/Password and Google Sign-In methods.
  1. Set up Firestore:
  • Go to Firestore Database, create a new database, and start in test mode.
  1. Add your Firebase configuration to the project:
  • Create a .env file in the root of your project and add your Firebase configuration:
     VITE_FIREBASE_API_KEY=your-api-key
     VITE_FIREBASE_AUTH_DOMAIN=your-auth-domain
     VITE_FIREBASE_PROJECT_ID=your-project-id
     VITE_FIREBASE_STORAGE_BUCKET=your-storage-bucket
     VITE_FIREBASE_MESSAGING_SENDER_ID=your-messaging-sender-id
     VITE_FIREBASE_APP_ID=your-app-id

Running the Application

npm run dev

Usage

  • Navigate to the Registration page by clicking on the signup button on the homepage.

    home
  • Enter Your correct details in the input fields. Make sure you pass the validations by checking if the red times change to a green tick.

    reg
  • Click on submit, and you should see a toast message that says 'registration successful'.

  • Alternatively, you can use the Google Sign-In button to log in with your Google account, it automatically signs you up as well.

  • After a successful registration, you will be redirected automatically to the Login page.

    login
  • Enter your email and password used during registration and it should log you in.

    success
  • You will be redirected to a welcome page upon successful login, where you will also see the logout button that logs you out of the application.

    welcome

Contributing

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add your feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

License

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

login-registration-auth-form's People

Contributors

kemi-oluwadahunsi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.