parity(auth): getClaims() should return typed AuthInvalidJwtError for expired JWT [from supabase-js]

Đã đóng
#262 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Tr00d đang làm issue này rồi.

Từ ngày 1/7/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

parity

[!WARNING]
Auto-generated parity issue — may be a false positive.

This issue was created automatically by /sync-sdk-parity from a heuristic analysis of recent supabase-js commits. The tooling has limited insight into language-specific idioms and may have:

  • misidentified a JS-only change as cross-language relevant,
  • missed an existing implementation in this SDK under a different name,
  • or proposed an API shape that doesn't fit this language's conventions.

It is the SDK author's responsibility to validate the need before implementing. If this change does not apply to this SDK, please close the issue with a short note explaining why.


SDK Parity: C# implementation needed

A bug fix was made in supabase-js auth that may apply to this repository. Please confirm applicability before starting work.

Reference Implementation (supabase-js)

  • Commit: 0dc5f80
  • PR: supabase/supabase-js#2395
  • Module: auth
  • Type: bug-fix
What Changed

getClaims() now catches expired-JWT errors and rethrows as AuthInvalidJwtError, ensuring callers receive a stable named error type.

Implementation Guidance (C#)

public class AuthInvalidJwtException : AuthException
{
    public AuthInvalidJwtException(string message) : base(message) { }
}

// GetClaims() with expired JWT:
// throw new AuthInvalidJwtException("JWT has expired");
// Callers: catch (AuthInvalidJwtException e) { ... }
Key Behaviors to Match
  • Expired JWT in GetClaims() throws a specific named exception type
  • Distinguishable from generic AuthException via type check

Acceptance Criteria

  • GetClaims() with expired JWT throws AuthInvalidJwtException
  • Distinguishable from generic AuthException
  • Test covers expired JWT case

Context

  • supabase-js version: v2.107.0
  • Related: SDK-1035 (dart), SDK-1036 (py), SDK-1037 (swift)
  • Parity tracking: Auto-generated by /sync-sdk-parity
Ngôn ngữ chính
C#
Star
705
Fork
111
Merge trung bình
18 giờ 50 phút
Pull request đã merge (30 ngày)
125

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của supabase/supabase-csharp

Tất cả issue của supabase/supabase-csharp

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.