Skip to content

[WOC] Implement Custom Authentication template #117

Closed
priyansh-narang2308 wants to merge 3 commits intoCSE-25:mainfrom
priyansh-narang2308:feat/custom-auth-template
Closed

[WOC] Implement Custom Authentication template #117
priyansh-narang2308 wants to merge 3 commits intoCSE-25:mainfrom
priyansh-narang2308:feat/custom-auth-template

Conversation

@priyansh-narang2308
Copy link
Contributor

description

This PR resolves issue #109 by introducing a new express_auth template in the CLI. It’s meant to act as a clean, production-ready base for projects that need authentication without extra setup.

what’s there

  • complete signup and login flow
  • mongoDB (Mongoose) integration with secure password hashing using bcryptjs
  • jWT-based authentication with token creation and a protect middleware
  • sample protected route (/profile) to show token verification in action

tow to test

  1. run node bin/index.js init
  2. choose the express_auth template
  3. start the server(locally orvia Docker Compose)
  4. Test:
    • /api/auth/register
    • /api/auth/login
    • /api/auth/profile

Register Flow (already exisiting()

Screenshot 2026-01-07 at 2 45 12 AM

Login with that token and the /profile to view success

Screenshot 2026-01-07 at 2 45 44 AM

Closes: #109
CC: @Ashrockzzz2003

@Devpool-soc
Copy link
Collaborator

Hey @priyansh-narang2308! Thank you for opening a pull request. Make sure to tag the maintainers and link the issue you are solving in your pull-request description if you have not already and they'll review as soon as possible.

@Ashrockzzz2003
Copy link
Member

@priyansh-narang2308 CI tests are failing - PTAL

@priyansh-narang2308
Copy link
Contributor Author

Hey @Ashrockzzz2003 Fixed it

Copy link
Member

@Ashrockzzz2003 Ashrockzzz2003 left a comment

Choose a reason for hiding this comment

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

@Ashrockzzz2003
Copy link
Member

Ashrockzzz2003 commented Jan 7, 2026

/bounty 100 @priyansh-narang2308

@Devpool-soc
Copy link
Collaborator

Another day, another coin. Way to get that bounty @priyansh-narang2308 you glorious keyboard-tapping, coffee-sipping, vibe-coding witcher!

@Ashrockzzz2003
Copy link
Member

/impact @priyansh-narang2308

@Devpool-soc
Copy link
Collaborator

What an IMPACT! Consider my tiny, shriveled heart officially impressed. Now, go and grab yourself a latte @priyansh-narang2308. You have earned it!

@priyansh-narang2308
Copy link
Contributor Author

Screenshot 2026-01-08 at 12 18 36 AM initialzied propoerly

the compose file
Screenshot 2026-01-08 at 12 19 00 AM

See for docker its working well

@Ashrockzzz2003

LGTM Can you test it with the docker flag if it works?

Refer to https://github.com/CSE-25/quick_start_express#initialize-with-a-docker-compose-file-and-dockerfile @priyansh-narang2308

@Ashrockzzz2003
Copy link
Member

Can you run that docker compose?
To see if it works for this feature...
It's a standard procedure we try to follow on new templates

@priyansh-narang2308 priyansh-narang2308 closed this by deleting the head repository Feb 6, 2026
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.

Add: Custom Authentication template

3 participants