mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-25 10:20:20 -05:00
dev: add expiresIn
This commit is contained in:
@@ -54,9 +54,13 @@ module.exports = eggspress('/auth/create-access-token', {
|
||||
}
|
||||
|
||||
const actor = Context.get('actor');
|
||||
|
||||
const options = {
|
||||
...(req.body.expiresIn ? { expiresIn: '' + req.body.expiresIn } : {}),
|
||||
};
|
||||
|
||||
const token = await svc_auth.create_access_token(
|
||||
actor, permissions
|
||||
actor, permissions, options
|
||||
);
|
||||
|
||||
res.json({ token });
|
||||
|
||||
Reference in New Issue
Block a user