{
  "id": "python/fastapi-jwt-decode-invalid-signature",
  "signature": "jose.exceptions.JWSSignatureError: Signature verification failed",
  "signature_zh": "jose.exceptions.JWSSignatureError: 签名验证失败。",
  "regex": "jose\\.exceptions\\.JWSSignatureError:\\ Signature\\ verification\\ failed",
  "domain": "python",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "JWT was signed with a different secret/key than the one used to verify, or the algorithm was mismatched.",
  "root_cause_type": "generic",
  "root_cause_zh": "JWT 使用的签名密钥与验证时的密钥不同，或算法不匹配。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "5.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Disables auth entirely; severe security hole.",
      "fail_rate": 0.99,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Accepts invalid tokens; security bypass.",
      "fail_rate": 0.98,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "payload = jwt.decode(token, SECRET_KEY, algorithms=['HS256'])",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.93,
      "how": "SECRET_KEY = os.environ['JWT_SECRET']  # same in issuer and verifier",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-04",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}