Skip to content

fix: use async bcrypt to avoid blocking the event loop#147

Closed
rotarymars wants to merge 1 commit intomainfrom
fix/async-bcrypt
Closed

fix: use async bcrypt to avoid blocking the event loop#147
rotarymars wants to merge 1 commit intomainfrom
fix/async-bcrypt

Conversation

@rotarymars
Copy link
Member

Description

Added async for better performance.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📝 Documentation update
  • 🎨 Style/UI change
  • ♻️ Refactor (no functional changes)
  • 🔧 Configuration change

Changes Made

  • added asyncs

Testing

  • Tested locally with npm run dev
  • Build passes (npm run build)
  • Lint passes (npm run lint)

Screenshots (if applicable)

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code where necessary
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Related Issues

@vercel
Copy link

vercel bot commented Mar 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kss-it-committee-github-io Ready Ready Preview, Comment Mar 8, 2026 2:07pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 2026

Warning

Rate limit exceeded

@rotarymars has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 55 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bd41a420-2462-4185-881e-c49157116192

📥 Commits

Reviewing files that changed from the base of the PR and between 646cf73 and 38ff89a.

📒 Files selected for processing (2)
  • src/app/api/auth/login/route.ts
  • src/app/api/auth/signup/route.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/async-bcrypt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rotarymars
Copy link
Member Author

Closing: the async bcrypt change is already included in PR #146 (login route) and the signup route change will be addressed separately.

@rotarymars rotarymars closed this Mar 19, 2026
rotarymars added a commit that referenced this pull request Mar 19, 2026
Replace malformed dummy hash (48 chars) with a properly generated
bcrypt hash (60 chars) so timing-attack prevention works correctly.
Also switch signup route from bcrypt.hashSync to async bcrypt.hash
to avoid blocking the event loop (subsumes PR #147).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants