How to enable JWT-only auth in Jitsi?

Hello,
i am developing a web-app in Angular [client] and NodeJS-express [server] on which i would like to embed in an iframe a Jitsi videochat session between two users.
Users in my app are authenticated and every user gets a JWT Token generated in Express with:

const jwt = require('jsonwebtoken');
......
 var token=jwt.sign(user.dataValues, config.token_secret);

I have successfully installed a Jitsi server that has no authentication.
I need to protect it to avoid that anonymous users connect and use it but it has to let users in my app to make a video session using their JWT tokens.

I embed in iframe with

        const options = {
        roomName: this.room,
        width: 600,
        height: 600,
        jwt: this.apiService.getUserToken(),
        parentNode: document.querySelector('#meet')
    };
    const api = new JitsiMeetExternalAPI(domain, options);

and i followed https://github.com/jitsi/lib-jitsi-meet/blob/master/doc/tokens.md to configure enable JWT, but after this, when i go to the jitsi server the webcam does not work for the anonymous user and for the JWT token user.

What am i doing wrong? Can anyone help me, please?
Do I have to generate my JWT token in some way according to Jitsi specs?

Thans in advance and greetings

I read somewhere this to downgrade helped to resolve this issue. I just kept this note.

apt-get install jicofo=1.0-549-1 jitsi-meet=2.0.4468-1 jitsi-videobridge2=2.1-183-gdbddd169-1 jitsi-meet-web=1.0.4025-1 jitsi-meet-web-config=1.0.4025-1 jitsi-meet-prosody=1.0.4025-1 jitsi-meet-turnserver=1.0.4025-1

1 Like

@Cris_Di How did you create permissions for different kinds of users, like who should have host features and who shouldn’t.

Hi @Cris_Di
For the token creation part, you have to set up custom web application for API. After that, you have to enable the token module in the Jitsi server.