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 = {
|
const jwtPayload: JwtPayload = {
|
||||||
sub: user.id,
|
sub: user.id,
|
||||||
email: user.email,
|
email: user.email,
|
||||||
|
phone: user.phone,
|
||||||
tenantId: user.tenantId,
|
tenantId: user.tenantId,
|
||||||
roles: user.roles,
|
roles: user.roles,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@ import { ExtractJwt, Strategy } from 'passport-jwt';
|
||||||
|
|
||||||
export interface JwtPayload {
|
export interface JwtPayload {
|
||||||
sub: string;
|
sub: string;
|
||||||
email: string;
|
email?: string;
|
||||||
|
phone?: string;
|
||||||
tenantId: string;
|
tenantId: string;
|
||||||
roles: string[];
|
roles: string[];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue