hotfix: refresh token cookie migration (HBE-167) (#31)
* chore: removed signed cookies from refresh token strategy * chore: removed signed cookies from refresh RTCookie decorator
This commit is contained in:
@@ -21,7 +21,7 @@ export class RTJwtStrategy extends PassportStrategy(Strategy, 'jwt-refresh') {
|
||||
super({
|
||||
jwtFromRequest: ExtractJwt.fromExtractors([
|
||||
(request: Request) => {
|
||||
const RTCookie = request.signedCookies['refresh_token'];
|
||||
const RTCookie = request.cookies['refresh_token'];
|
||||
if (!RTCookie) {
|
||||
throw new ForbiddenException(COOKIES_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,6 @@ import { GqlExecutionContext } from '@nestjs/graphql';
|
||||
export const RTCookie = createParamDecorator(
|
||||
(data: unknown, context: ExecutionContext) => {
|
||||
const ctx = GqlExecutionContext.create(context);
|
||||
return ctx.getContext().req.signedCookies['refresh_token'];
|
||||
return ctx.getContext().req.cookies['refresh_token'];
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user