Skip to content

Commit

Permalink
fix(cookie): πŸ› Fix SameSite cookie issues for refresh token
Browse files Browse the repository at this point in the history
  • Loading branch information
n8io committed Nov 22, 2020
1 parent 2e8a64e commit ff6db79
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/service/src/types/auth/selectors.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { Enumeration } from './typedef';
const {
ACCESS_TOKEN_EXPIRY,
ACCESS_TOKEN_SECRET,
NODE_ENV,
REFRESH_TOKEN_EXPIRY,
REFRESH_TOKEN_SECRET,
} = config;
Expand Down Expand Up @@ -255,7 +254,8 @@ describe('auth selectors', () => {
httpOnly: true,
maxAge: ms(REFRESH_TOKEN_EXPIRY),
path: Route.REFRESH_TOKEN,
secure: NODE_ENV === 'production',
sameSite: 'none',
secure: true,
},
];

Expand All @@ -272,9 +272,10 @@ describe('auth selectors', () => {
'',
{
httpOnly: true,
maxAge: ms(REFRESH_TOKEN_EXPIRY),
maxAge: 0,
path: Route.REFRESH_TOKEN,
secure: NODE_ENV === 'production',
sameSite: 'none',
secure: true,
},
];

Expand Down

0 comments on commit ff6db79

Please sign in to comment.