File tree 2 files changed +7
-1
lines changed
packages/altair-api/src/auth
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { PasswordService } from './password/password.service';
14
14
import { IToken } from '@altairgraphql/api-utils' ;
15
15
import { getAgent } from 'src/newrelic/newrelic' ;
16
16
17
+ const NEW_USER_TIME = 1000 * 60 * 10 ; // 10 minutes
17
18
@Injectable ( )
18
19
export class AuthService {
19
20
private readonly agent = getAgent ( ) ;
@@ -109,7 +110,7 @@ export class AuthService {
109
110
firstName : user . firstName ,
110
111
lastName : user . lastName ,
111
112
picture : user . picture ,
112
- isNewUser : Date . now ( ) - user . createdAt . getTime ( ) < 1000 * 60 * 10 , // 10 minutes
113
+ isNewUser : Date . now ( ) - user . createdAt . getTime ( ) < NEW_USER_TIME ,
113
114
tokens : this . generateTokens ( { userId : user . id } ) ,
114
115
} ;
115
116
}
Original file line number Diff line number Diff line change @@ -5,11 +5,16 @@ export function mockUser(): User {
5
5
return {
6
6
id : 'f7102dc9-4c0c-42b4-9a17-e2bd4af94d5a' ,
7
7
stripeCustomerId : 'f7102dc9-4c0c-42b4-9a17-e2bd4af94d5a' ,
8
+ resendContactId : 'f7102dc9-4c0c-42b4-9a17-e2bd4af94d5a' ,
8
9
9
10
firstName : 'John' ,
10
11
lastName : 'Doe' ,
11
12
picture : 'asdf' ,
12
13
isNewUser : false ,
14
+ emailVerified : new Date ( ) ,
15
+ password : 'password' ,
16
+ createdAt : new Date ( ) ,
17
+ updatedAt : new Date ( ) ,
13
18
} as User ;
14
19
}
15
20
You can’t perform that action at this time.
0 commit comments