bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
10.71k stars 1.4k forks source link

JWT authentication does not work with auth0 provider #3324

Closed miguelaeh closed 1 week ago

miguelaeh commented 1 month ago

Which version are you using?

v1.8.0

Which operating system are you using?

Describe the issue

Description

Using the JWT authentication method does not seem to be able to authorize users when the token comes from auth0.

Describe how to replicate the issue

  1. start the server with authMethod: jwt and authJWTJWKS: https://your-auth0-domain/.well-known/jwks.json
  2. try to publish a stream using an accessToken from auth0
  3. see the 401 error

Did you attach the server logs?

There are no hints on the logs, even with debug enabled.

Did you attach a network dump?

no

aler9 commented 1 week ago

Hello, requirements on the JWT format are listed in the README. Further assessment on the issue are not possible since you didn't attach a sample JWT or server logs. If you still have problems, create a bug and attach the JWT and server logs.

miguelaeh commented 1 week ago

@aler9 As I mentioned in the original issue, no messages appear on the logs related to authentication, even using the debug mode. With the steps I provided it is easily replicated. The requirements listed on the README are either wrong or something is missing for the auth0 provider.