UCR-Senior-Design / course-project-fries

course-project-fries created by GitHub Classroom
1 stars 0 forks source link

Fixed user session and initialized the AI chatbot #60

Closed sujingbo0217 closed 4 months ago

sujingbo0217 commented 4 months ago

Please check the user session commit first.

How to check the user session?

  1. Update the latest dependencies
  2. Create a new .env file in the backend:
PORT=5001
JWT_SECRET="JWT_SECRET_KEY"
  1. Run the project
  2. To check the user session, you can: a. Read file auth.js in the frontend. b. Import useAuth like import {useAuth} from "../utils/auth"; and call const {isLoggedIn} = useAuth(); c. Directly use the boolean variable isLoggedIn to check whether the user is logged in.