Set cookies to secure

ref #25
This commit is contained in:
Nicolai Ort 2020-12-12 18:32:48 +01:00
parent 36fbccb286
commit 0e003d2dc4
1 changed files with 2 additions and 2 deletions

View File

@ -25,8 +25,8 @@ export class AuthController {
let auth;
try {
auth = await createAuth.toAuth();
response.cookie('lfk_backend__refresh_token', auth.refresh_token, { maxAge: 900000, httpOnly: true });
response.cookie('lfk_backend__refresh_token_expires_at', auth.refresh_token_expires_at, { maxAge: 900000, httpOnly: true });
response.cookie('lfk_backend__refresh_token', auth.refresh_token, { maxAge: 900000, httpOnly: true, secure: true });
response.cookie('lfk_backend__refresh_token_expires_at', auth.refresh_token_expires_at, { maxAge: 900000, httpOnly: true, secure: true });
return response.send(auth)
} catch (error) {
throw error;