gbowne1 / gbowne1/codestream

Restrict start-stream event to authenticated users

Open
#105 1 comment 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted security
Dominant language
JavaScript
Stars
9
Forks
24
PR merge metrics
No merged PRs in 30d

Description

## Summary
Currently, any connected socket can trigger the `start-stream` event and create a live stream.

## Problem
There is no authentication check inside the Socket.IO layer. This allows unauthenticated users to start streams.

## Suggested Improvement
Integrate authentication validation into the WebSocket layer so that only logged-in users can initiate `start-stream`.

Possible approaches:
- Validate JWT token during socket connection
- Attach user data to `socket.user`
- Check authentication before allowing `start-stream`

## Why This Matters
This improves platform security and prevents unauthorized stream creation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.