Skip to content

CoderMahabub/ema-john-simple

Repository files navigation

ema-john-online-shop

Live Site: Live Website.

TODO: Steps for authentication

Step -1: Initial Setup========================

  1. Firebase: Create Project
  2. Create Web App
  3. Get Configuration
  4. Initialize Firebase
  5. Enable Auth Method

Step-2: Setup Component=======================

component/

  1. Create Login Component
  2. Create Register Component
  3. Create Route for LogIn and Register

Step-3: Setup Auth System=====================

hooks/useFirebase

  1. Set up sign in methode
  2. setup sign out methode
  3. user state
  4. Special Observer
  5. Return Neccessary Methods and states from useFirebase

Step-4: Create Auth Context Hook (useAuth)=====

src/context folder

  1. Create a auth context
  2. create context provider
  3. Set context provider context value
  4. use Auth Provider
  5. create useAuth Hook

Step-5: Crate Private Route=======================

  1. Create Private Route
  2. Set Private Route

Step-6: Redireact after login===================

  1. after login redirect user to their desired destination