mirror of
https://github.com/timvisee/send.git
synced 2025-10-04 18:19:17 +02:00
added oauth refresh token support
This commit is contained in:
parent
ce507c557f
commit
f3a1fde07f
9 changed files with 120 additions and 32 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