Skip to content

Function: tokenAuth() ​

ts
function tokenAuth(options): (request, scope) => Promise<Response | Authenticated>;

Defined in: server/tokens.ts:140

An authenticate function for routeToRoom and routeToMatchmaker that accepts signed join tokens. The client connects with ?token=...; plain HTTP requests may send Authorization: Bearer ... instead.

Parameters ​

ParameterType
optionsTokenAuthOptions

Returns ​

(request, scope) => Promise<Response | Authenticated>

MIT licence. Tickflare is an independent project and is not affiliated with Cloudflare.