feature/25-refresh-token-cookie #29

Merged
niggl merged 9 commits from feature/25-refresh-token-cookie into dev 2020-12-12 18:52:28 +00:00
Showing only changes of commit 0e003d2dc4 - Show all commits

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;