feat: Check jwt expiration and redirects to auth url if any. (#13879)
* feat: Check jwt expiration and redirects to auth url if any.
It may happen that the jwt had expired while being in the meeting and there is a network issue requiring to reload.
* squash: Fixes lint error.
* squash: Fixes comments.
feat(jwt) deprecate and remove enableFeaturesBasedOnToken
The new behavior is as follows:
IF a user has a token and `features` is not set, we treat it as if the
feature was enabled.
IF a user has a token and `features` is set, we check if the feature
name has a value of "true".
`isJwtFeatureEnabled` also provides a way to specify the default value
in case there is no token.
The counterpart of the external API in the Jitsi Meet Web app uses the
search URL param jwt to heuristically detect that the Web app is very
likely embedded (as an iframe) and, consequently, needs to forcefully
enable itself. It was looking at whether there was a JSON Web Token
(JWT) but that logic got broken when the JWT support was rewritten
because the check started happening before the search URL param jwt was
parsed.