502 error on enabling token authentication

Having trouble with Jitsi-meet on enabling and installing token authentication.

I followed the exact steps mentioned in lib-jitsi-meet/doc/tokens.md but there were a couple of dependency issues.

So, in order to remove those I installed:

apt-get install liblua5.2-dev
wget https://keplerproject.github.io/luarocks/releases/luarocks-2.4.1.tar.gz
./configure --lua-version=5.2 --versioned-rocks-dir
make build
sudo make install
luarocks-5.2 install net-url
luarocks-5.2  install basexx
apt-get install libssl1.0-dev
luarocks-5.2  install luajwtjitsi
luarocks-5.2  install lua-cjson 2.1.0-1

After installing these all the module issues were resolved from the prosody logs but I’m still getting 502 on connecting to the server. In console I get the following error:

but my prosody error logs are clear.