Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shrivastava-26/firebase_authorization
https://github.com/shrivastava-26/firebase_authorization
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/shrivastava-26/firebase_authorization
- Owner: shrivastava-26
- Created: 2024-08-12T15:38:11.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-11-12T10:09:38.000Z (about 1 month ago)
- Last Synced: 2024-11-12T11:20:14.437Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://anumati.vercel.app
- Size: 196 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Firebase Authorization🧑💻
This project demonstrates how to implement user authentication using Firebase Authentication. It provides an overview of the setup process, code snippets, and usage instructions.
## Table of Contents
- [Introduction](#introduction)
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Firebase Setup](#firebase-setup)
- [Usage](#usage)
- [Code Snippets](#code-snippets)
- [License](#license)## Introduction
Firebase Authentication provides backend services for easy use of authentication, including social login providers like Google, Facebook, and email/password authentication. This project showcases how to set up and use Firebase Authentication in a web application.
## Getting Started
Follow the steps below to set up Firebase Authentication in your project.
### Installation
Make sure you have Node.js and npm installed on your machine. Create a new project directory and run the following command to initialize it:
mkdir firebase-auth-demo
cd firebase-auth-demo
npm init -y
Then, install the Firebase SDK:
npm install firebase
Firebase Setup
Create a Firebase Project:Go to the Firebase Console.
Click on "Add project" and follow the prompts to create a new Firebase project.
Enable Authentication:In the Firebase Console, navigate to the "Authentication" section.
Click on "Get Started".
Enable the sign-in methods you want (Email/Password, Google, etc.).
Get Firebase Config:Click on the gear icon next to "Project Overview" and select "Project settings".
Under "Your apps", register your app and copy the Firebase configuration object.
Add Firebase to Your Project:Create a firebase.js file in your project directory and initialize Firebase:
// firebase.js
import { initializeApp } from "firebase/app";
import { getAuth } from "firebase/auth";const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_STORAGE_BUCKET",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID"
};
const app = initializeApp(firebaseConfig);
export const auth = getAuth(app);