Jisti authentication with Django

Hello
I’m creating a Jitsi instance with Docker, and I’d like to add authentication so only authenticate users can create a room. I saw how to do this on multiple topics so this is not my problem.

I also have a Django backend with authentication and different authorization for users, so I’d like Jitsi authentication to go through my django auth, instead of in the prosody configuration file.

I don’t know if I understood well how jitsi authentication works, but is there a way to do that ? Maybe with an http request ?

I saw i could be made with JWT, but I need my Jitsi instance to be easy to use with the mobile app, and JWT makes URLs that are ugly for web users

Thanks !

You can set the tokenAuthUrl in your config.js to redirect users to your authentication endpoint. After successfull authentication, the user must be redirected back to the conference url with the ?jwt=[...] parameter appended to the URL. See Auto login to iFrame or API to use? - #5 by corby

thank you for you reply !

I’ll try that

Hello,
I tryed to set the tokenAuthUrl in my config.js file, but it seems like it doesn’t work.
I found this issue Guest mode + JWT Auth not working · Issue #9057 · jitsi/jitsi-meet · GitHub and it was supposed to be solved by this PR fix(authentication): removed old LoginDialog.js file, fixed redirection to the external auth and created actions.any.js by Calinteodor · Pull Request #9049 · jitsi/jitsi-meet · GitHub, but it doesn’t work for me

Any solution ?

to which problem exactly ? Your fist post was about basic authentication, and you are now mentioning another problem, about letting unauthenticated users getting in existing rooms created by authenticated users. Which it is ?

I’ve created authentication with JWT, and it works well, when I create a room with a ?jwt=[...] in my url, I got moderator rights.
Now I want to use a Django form to check if my user is registered, create the JWT and set it in my URL
With tokenAuthUrl I’m supposed to redirect where I want my user to authenticate. So I’d like to redirect to my Django authentication form, instead of the Jitsi default form.
In order to do that, I have to set the redirect URL in my .env file and my config.js file.
My problem is that my redirection doesn’t work.

Blockquote you are now mentioning another problem, about letting unauthenticated users getting in existing rooms created by authenticated users.

I may not explained myself well, but I didn’t talk about that

Thank you for your help

so in a word redirection does not work for you, never mind Django. Did you search the Jitsi handbook for ‘JWT’ ? There is no integrated search, you have to use a search engine.

That’s it, my problem is about redirection, not Django.
I’ve search about JWT in the handbook, but I didn’t find help :confused:
The only thing I have is this : Self-Hosting Guide - Docker · Jitsi Meet Handbook and it doesn’t mention the TOKEN_AUTH_URL in the .env file

I didn’t find anything on the forum either

I can’t help you about docker, don’t know anything about it.
Edit: if your problem is linked mainly to Docker , not Django, creating a new thread would be a good idea since Docker specialists will take a look at it else if they know nothing about Django they will probably not even read it.

I’ve created the new thread here
Thanks for your help