feat: /refresh route complete along with refresh token rotation

This commit is contained in:
Balu Babu
2023-01-11 19:29:33 +05:30
parent d3a43cb65f
commit 36b32a1813
9 changed files with 137 additions and 9 deletions

View File

@@ -0,0 +1,9 @@
import { createParamDecorator, ExecutionContext } from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
export const RTCookie = createParamDecorator(
(data: unknown, context: ExecutionContext) => {
const ctx = GqlExecutionContext.create(context);
return ctx.getContext().req.cookies['refresh_token'];
},
);