Updated profile and post capabilities
This commit is contained in:
@@ -35,6 +35,12 @@ async function login(req, res) {
|
||||
}
|
||||
|
||||
const { token, expiresAt } = signToken(rows[0].id);
|
||||
res.cookie('fc_session_token', token, {
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
sameSite: 'Strict',
|
||||
path: '/',
|
||||
});
|
||||
res.status(200).json({ id: rows[0].id, token, expires_at: expiresAt });
|
||||
}
|
||||
catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user