Some error checks
parent
a49258e840
commit
d09e7f5565
|
|
@ -368,7 +368,9 @@ async function setupAuth()
|
||||||
app.get(
|
app.get(
|
||||||
'/auth/callback',
|
'/auth/callback',
|
||||||
passport.authenticate('oidc', { failureRedirect: '/auth/login' }),
|
passport.authenticate('oidc', { failureRedirect: '/auth/login' }),
|
||||||
async (req, res) =>
|
async (req, res, next) =>
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
const state = JSON.parse(base64.decode(req.query.state));
|
const state = JSON.parse(base64.decode(req.query.state));
|
||||||
|
|
||||||
|
|
@ -401,6 +403,11 @@ async function setupAuth()
|
||||||
picture : peer.picture
|
picture : peer.picture
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
catch (error)
|
||||||
|
{
|
||||||
|
return next(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -586,6 +593,7 @@ async function runWebSocketServer()
|
||||||
{
|
{
|
||||||
logger.error('room creation or room joining failed [error:"%o"]', error);
|
logger.error('room creation or room joining failed [error:"%o"]', error);
|
||||||
|
|
||||||
|
if (socket)
|
||||||
socket.disconnect(true);
|
socket.disconnect(true);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue