fix: Redis session env fix + JWT import path fix (登录失败根因修复) #52
Reference in New Issue
Block a user
Delete Branch "hotfix/redis-session-env-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
修复内容
ENABLE_REDIS_SESSION→ENABLE_REDIS_SESSIONS(config.py, dependencies.py, .env)127.0.0.1→0.0.0.0(允许跨容器连接)from packages.config.settings import settings→from app.config import settings(jwt_service.py 第232行)根因分析
登录返回401的根因是 jwt_service.py 中引用了不存在的模块路径
packages.config.settings,导致 JWT token 生成时抛出 ModuleNotFoundError,被 except 捕获后返回通用错误 "邮箱或密码错误"。测试