Skip to content

fix: require valid admin secret for admin registration - #8

Closed
sivaharish31 wants to merge 1 commit into
10-Mohan:mainfrom
sivaharish31:fix/admin-registration-secret
Closed

sivaharish31 wants to merge 1 commit into
10-Mohan:mainfrom
sivaharish31:fix/admin-registration-secret

Conversation

@sivaharish31

Copy link
Copy Markdown

Summary

  • Require a valid admin secret before allowing admin registration.
  • Return HTTP 403 when the admin secret is missing or incorrect.
  • Add authentication tests covering normal and admin registration.

Testing

  • cd server && npm test
  • 17 tests passed

Security

Previously, a user could register with role: "admin" without providing the valid admin secret. This change validates the secret before assigning the admin role.

Closes #6

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 4, 2026

Copy link
Copy Markdown

@sivaharish31 is attempting to deploy a commit to the 10-mohan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@sivaharish31 sivaharish31 closed this by deleting the head repository Oct 31, 2026
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.

Admin registration role can be assigned without validating the admin secret

1 participant