Now w/ working cookie based refresh

ref #25
This commit is contained in:
2020-12-12 19:25:40 +01:00
parent 615b54ec4f
commit aca3eaaeea
2 changed files with 11 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
import { IsString } from 'class-validator';
import { IsOptional, IsString } from 'class-validator';
import * as jsonwebtoken from 'jsonwebtoken';
import { getConnectionManager } from 'typeorm';
import { config } from '../../config';
@@ -8,7 +8,8 @@ import { Auth } from '../responses/ResponseAuth';
export class RefreshAuth {
@IsString()
token: string;
@IsOptional()
token?: string;
public async toAuth(): Promise<Auth> {
let newAuth: Auth = new Auth();