added oauth refresh token support

Co-authored-by: timvisee <tim@visee.me>
This commit is contained in:
Danny Coates 2020-07-24 18:11:50 -07:00 committed by timvisee
parent b15c017dcd
commit 4f273eca03
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
8 changed files with 118 additions and 27 deletions

View file

@ -70,6 +70,10 @@ module.exports = {
const token = authHeader.split(' ')[1];
req.user = await fxa.verify(token);
}
return next();
if (req.user) {
next();
} else {
res.sendStatus(401);
}
}
};