added oauth refresh token support
Co-authored-by: timvisee <tim@visee.me>
This commit is contained in:
parent
b15c017dcd
commit
4f273eca03
8 changed files with 118 additions and 27 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue