fix(auth): make JwtPayload email optional, add phone to JWT payload
This commit is contained in:
parent
96bf5e7390
commit
b8128b7a07
|
|
@ -473,6 +473,7 @@ export class AuthService {
|
|||
const jwtPayload: JwtPayload = {
|
||||
sub: user.id,
|
||||
email: user.email,
|
||||
phone: user.phone,
|
||||
tenantId: user.tenantId,
|
||||
roles: user.roles,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import { ExtractJwt, Strategy } from 'passport-jwt';
|
|||
|
||||
export interface JwtPayload {
|
||||
sub: string;
|
||||
email: string;
|
||||
email?: string;
|
||||
phone?: string;
|
||||
tenantId: string;
|
||||
roles: string[];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue