tezvyn:

FastAPI 0.118 ships first-class WebSocket auth

AI-drafted, machine-checkedSource: FastAPI Blogbeginner
FastAPI 0.118 ships first-class WebSocket auth

The new release adds dependency injection for WebSocket connections, so you can finally reuse your JWT auth dependencies on /ws routes without manual header parsing.

Until now, FastAPI WebSocket routes couldn't use Depends() with the same auth helpers as HTTP routes. 0.118 fixes that and adds a built-in heartbeat to kill zombie connections.

Read the original → FastAPI Blog

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.