Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed login and signup API endpoints #165

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

srujanGowda08
Copy link
Contributor

@srujanGowda08 srujanGowda08 commented Jan 6, 2025

Closes #163

  • Added /auth/signup endpoint for user registration.
  • Added /auth/login endpoint for user authentication.
  • Added cookie-based JWT storage for secure user sessions.

Video:- https://drive.google.com/file/d/1a6zQEWVKzjijgIdFJ8eCDOAK9mrilTAm/view?usp=sharing

Screenshot 2025-01-07 001536
Screenshot 2025-01-07 001503
Screenshot 2025-01-07 001446
Screenshot 2025-01-07 001433
Screenshot 2025-01-07 001414
Screenshot 2025-01-07 001257

If u want a complete video i will share a video in discard

Copy link
Collaborator

@techy4shri techy4shri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the changes are good while some are questionable, I have commented on them where they're. @BhattAnsh please check them once.


- Node.js installed
- MongoDB instance running locally or remotely
- Postman for API testing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Postman is not necessarily needed since you can test API requests multiple ways.

}
```

#### Example (Postman):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will wait for @BhattAnsh 's review on this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change the folder structure? I am curious 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This folder structure is a standard approach for organizing backend projects, which helps in maintaining clarity and scalability. If you have any specific suggestions or prefer a different structure, feel free to share them! I'd be happy to adapt to a structure that better suits the team's preferences.

const router = express.Router();

// Correctly typed middleware function
router.post("/signup", signup);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment here, // Correctly typed middleware function what was the reason behind this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have provided an example of how to use Postman; that's it.
The folder structure follows the best practices for the backend.
The code is commented for my reference, showing the syntax for middleware, that's all. Comments will help for further development

@srujanGowda08
Copy link
Contributor Author

guys if u want to change something , I am ready to do that ...

@techy4shri
Copy link
Collaborator

@srujanGowda08 wait for sometime for the PA to review these changes. We will let you know if any changes are required. In the meantime, please add the video in the description of the PR itself.

@techy4shri techy4shri merged commit 8cbc9bf into BhattAnsh:restart Jan 9, 2025
1 check passed
@techy4shri
Copy link
Collaborator

Merged.

@techy4shri techy4shri added the SWOC label Jan 9, 2025
@techy4shri
Copy link
Collaborator

@srujanGowda08 add the video and mention the issue.

@srujanGowda08
Copy link
Contributor Author

@srujanGowda08
Copy link
Contributor Author

please add me the points thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backend Issue: Create API for User Authentication
2 participants