Delay before redirect to jwt provider

I have got my server setup using jwt authentication working, running in Docker. I have one slightly irritating problem left though. When I try to enter a room I first get to the welcome screen, it starts my camera etc and then two seconds later I’m redirected to my jwt provider (which then redirects back including a jwt). Did I do anything wrong or is this simply how it works? Why doesn’t the redirect happen instantly, before the user even get to the welcome screen?

This is what I get in my Prosody log when a user connects:

2022-08-11T06:47:56.749471337Z c2s556e2b22acb0 info Client connected
2022-08-11T06:47:56.864666750Z general warn Error verifying token err:not-allowed, reason:token required
2022-08-11T06:47:57.114055494Z c2s556e2b22acb0 info Client disconnected: connection closed
2022-08-11T06:48:00.272309904Z c2s556e2b7f2ab0 info Client connected
2022-08-11T06:48:00.409288105Z c2s556e2b7f2ab0 info Authenticated as 6f7f2265-1665-4b4f-91cf-2dff110c519b@meet.jitsi

This is no big problem, but it’s confusing my users, since the welcome screen makes them think it’s ready to enter the room, and then just when they’re gonna click enter room the entire page reloads again :slight_smile:

That’s the way it works today. We need to show something while the auth logic is loaded.

Note, however, that the tken redirect URL will be going away: Intent to deprecate and remove: external auth mechanisms - #11 by Damien_FETIS

1 Like