diff --git a/src/modules/host/services/token.service.ts b/src/modules/host/services/token.service.ts index 403744b..29642ca 100644 --- a/src/modules/host/services/token.service.ts +++ b/src/modules/host/services/token.service.ts @@ -53,10 +53,10 @@ export class TokenService { config.jwt.secret ); - await this.prisma.token.deleteMany({ - where: { userXid: user_xid } - }) - + // Optionally keep existing refresh tokens alive instead of deleting + // Removed deleteMany call so the same refresh token can be used multiple + // times. If you want to limit refresh tokens later you can implement + // rotation or blacklist logic elsewhere. await this.prisma.token.create({ data: { token: refreshToken.token,