processing / processing/p5.js-web-editor
OAuth unlink routes missing isAuthenticated middleware.
@Piyushrathoree is already working on this.
Since Sep 18, 2026.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 1.7k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 8
Description
p5.js version
No response
What is your operating system?
None
Web browser and version
No response
Actual Behavior
The DELETE /auth/github and DELETE /auth/google routes in
server/routes/user.routes.ts
do not use the isAuthenticated middleware. Every other account-management route in the same file uses it (PUT /account, POST /account/api-keys, PUT /cookie-consent, PUT /preferences).
Without the middleware, unauthenticated requests receive a 404 status from the controller's inline guard instead of the standard 401.
The JSDoc for both handlers in authManagement.ts even notes Authenticated: false -- TODO: update to true?.
Expected Behavior
Both routes should use isAuthenticated middleware, returning 401 for unauthenticated requests — consistent with every other account route.
Steps to reproduce
Steps:
- Start the dev server with
npm start - Without logging in, send
DELETE /auth/github(e.g. via curl) - Observe: response is
404with"You must be logged in..." - Expected: response should be
401(from isAuthenticated middleware)
Relevant code:
// server/routes/user.routes.ts lines 48-51
// DELETE /auth/github
router.delete('/auth/github', UserController.unlinkGithub); // ← missing isAuthenticated
// DELETE /auth/google
router.delete('/auth/google', UserController.unlinkGoogle); // ← missing isAuthenticated
// Compare with adjacent route (line 47):
router.put('/account', isAuthenticated, UserController.updateSettings); // ← has it
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.