fix(auth-service): JWT access token 加入 type/userId/accountSequence 字段

presence-service 的 JwtAuthGuard 校验 payload.type === 'access',
但之前 token 只有 sub/phone/source,导致心跳接口一直 401。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-05 21:09:24 -08:00
parent 38423e7bf0
commit 330f8c7681
1 changed files with 3 additions and 0 deletions

View File

@ -391,6 +391,9 @@ export class AuthService {
private generateAccessToken(user: UserAggregate): string {
const payload = {
sub: user.accountSequence.value,
type: 'access',
userId: user.accountSequence.value,
accountSequence: user.accountSequence.value,
phone: user.phone.value,
source: user.source,
};