Can Peertube use JWT tokens to access specific videos?

Hi all,

I am trying to figure out if peertube will fit the following requirements.

  • We need to embedded videos in a web application which has already authenticated a user
  • The videos should not be publically available but only to users who have been authenticated by the web app
  • Users on the web app will be in different groups and should only access videos for that group.

Is there a way to do this with Peertube or any other open source alternative? From my research I suspect that its not possible in Peertube but would be great to know if this is true or not. I was thinking of something like a jwt token?

thanks

1 Like

You can just configure your reverse proxy to catch the embed route, and deal with the authentication there with your app proxying the embed route.

2 Likes

Another way could be a peertube plugin that checks user auth and refuses to serve the video if the user is not logged in on the remote platform

2 Likes

That is very interesting, thank you. Is it possible to configure proxy in such a way, if peertube is running on YunoHost instance?

Yes. YunoHost has a reverse-proxy which you can configure, though I don’t think your changes would be kept along updates.

1 Like