This pull request introduces user authentication functionality to the application. It adds the capability for users to register and log in, leveraging JWT for secure token generation and bcryptjs for password hashing.
Summary
Added bcryptjs, express-session, and jsonwebtoken dependencies to package.json for handling encryption and session management.
Created a new User model in models/User.js with fields for email, password, createdAt, and updatedAt.
Implemented authentication middleware in middleware/auth.js that verifies JWT tokens in the request headers.
Introduced new authentication routes in routes/authRoutes.js for user registration and login, including password hashing and token generation.
Integrated authRoutes into the main application file app.js and included the necessary middleware for parsing request bodies and logging.
Fixes #69.
π Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
PR Feedback (click)
Description
This pull request introduces user authentication functionality to the application. It adds the capability for users to register and log in, leveraging JWT for secure token generation and bcryptjs for password hashing.
Summary
bcryptjs
,express-session
, andjsonwebtoken
dependencies topackage.json
for handling encryption and session management.User
model inmodels/User.js
with fields foremail
,password
,createdAt
, andupdatedAt
.middleware/auth.js
that verifies JWT tokens in the request headers.routes/authRoutes.js
for user registration and login, including password hashing and token generation.authRoutes
into the main application fileapp.js
and included the necessary middleware for parsing request bodies and logging.Fixes #69.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.