♻️(backend) use Authorization header for LiveKit token authentication

Replace passing the LiveKit JWT in the request body with the
Authorization header, following standard authentication practices.

Extend the LiveKit authentication backend usage across additional
endpoints.

This also raises questions about how clients should securely
retrieve LiveKit tokens, to be addressed later.
This commit is contained in:
lebaudantoine
2026-04-08 19:22:55 +02:00
parent 07af7a85ff
commit 5d7a54e809
6 changed files with 143 additions and 44 deletions
@@ -17,9 +17,11 @@ export const useRenameParticipant = () => {
return fetchApi(`rooms/${data.id}/rename/`, {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({
name,
token,
}),
})
}
@@ -17,9 +17,11 @@ export const useRaiseHand = () => {
return fetchApi(`rooms/${data.id}/toggle-hand/`, {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({
raised,
token,
}),
})
}
@@ -14,9 +14,9 @@ const startSubtitle = ({
}: StartSubtitleParams): Promise<ApiRoom> => {
return fetchApi(`rooms/${id}/start-subtitle/`, {
method: 'POST',
body: JSON.stringify({
token,
}),
headers: {
Authorization: `Bearer ${token}`,
},
})
}