{
  "id": "go/grpc-unauthenticated-token-expired",
  "signature": "rpc error: code = Unauthenticated desc = token expired: current time 2025-01-15T10:00:00Z is after exp 2025-01-15T09:00:00Z",
  "signature_zh": "rpc错误：代码=未认证 描述=令牌已过期：当前时间2025-01-15T10:00:00Z晚于到期时间2025-01-15T09:00:00Z",
  "regex": "rpc\\ error:\\ code\\ =\\ Unauthenticated\\ desc\\ =\\ token\\ expired:\\ current\\ time\\ 2025\\-01\\-15T10:00:00Z\\ is\\ after\\ exp\\ 2025\\-01\\-15T09:00:00Z",
  "domain": "go",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "The authentication token used in the gRPC call has expired, requiring a new token.",
  "root_cause_type": "generic",
  "root_cause_zh": "gRPC调用中使用的身份验证令牌已过期，需要新令牌。",
  "versions": [
    {
      "version": "1.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Use the same expired token and hope it works.",
      "why_fails": "The server checks expiration; expired tokens are always rejected.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "Manually extend the token's expiration without re-authentication.",
      "why_fails": "Token expiration is enforced by the auth server; manual changes are invalid.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Refresh the token before making the RPC call.",
      "success_rate": 0.9,
      "how": "token, err := refreshToken()\nif err != nil { log.Fatal(err) }\nconn, err := grpc.Dial(\"localhost:8080\", grpc.WithInsecure(), grpc.WithPerRPCCredentials(&tokenCreds{token: token}))",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement automatic token refresh in an interceptor.",
      "success_rate": 0.85,
      "how": "func refreshInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {\n    token, err := getValidToken()\n    if err != nil { return err }\n    md := metadata.Pairs(\"authorization\", \"Bearer \"+token)\n    ctx = metadata.NewOutgoingContext(ctx, md)\n    return invoker(ctx, method, req, reply, cc, opts...)\n}",
      "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": "2025-01-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}