feat: 登录时同步微信头像和昵称

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
richarjiang
2026-04-05 10:47:39 +08:00
parent 2862d280be
commit 64b319ea19
5 changed files with 57 additions and 6 deletions

View File

@@ -2,7 +2,7 @@ import { Module } from '@nestjs/common'
import { PassportModule } from '@nestjs/passport'
import { JwtModule } from '@nestjs/jwt'
import { ConfigModule, ConfigService } from '@nestjs/config'
import { AuthService } from './auth.service'
import { AuthService, RANDOM_FN_TOKEN } from './auth.service'
import { AuthController } from './auth.controller'
import { WechatService } from './wechat.service'
import { JwtStrategy } from './jwt.strategy'
@@ -22,7 +22,7 @@ import { RolesGuard } from './roles.guard'
}),
],
controllers: [AuthController],
providers: [AuthService, WechatService, JwtStrategy, JwtAuthGuard, RolesGuard],
providers: [AuthService, WechatService, JwtStrategy, JwtAuthGuard, RolesGuard, { provide: RANDOM_FN_TOKEN, useValue: Math.random }],
exports: [JwtStrategy, JwtAuthGuard, RolesGuard, AuthService],
})
export class AuthModule {}