-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
The docs suggest nesting any extra params under a custom key, in signed tokens. https://docs.mux.com/guides/secure-video-playback#passing-custom-parameters-to-a-signed-token
{
"sub": "{PLAYBACK_ID}",
"aud": "{AUDIENCE_TYPE}",
"exp": "{EXPIRATION_TIME}",
"custom": {
"session_id": "xxxx-123"
}
}But the type of params field in the MUXJWTSignOptions does not allow this, necessitating the use of ts-ignore if custom parameters are being used.
mux-node-sdk/src/util/jwt-types.ts
Line 43 in 5b63e5b
| params?: Record<string, string>; |
Maybe this can be expanded to something more relaxed like params?: Record<string, string | Record<string, string>>; ?
Not the most severe bug but would be a nice QOL improvement.
flacial
Metadata
Metadata
Assignees
Labels
No labels