Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

parity(auth): return null from session storage on JSON parse failure [from supabase-js]

Abierto
#263 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@Tr00d ya está trabajando en esto.

Desde el 1/7/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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 defensive fix was made in supabase-js auth that may apply to this repository. Please confirm applicability before starting work.

Reference Implementation (supabase-js)

  • Commit: 0c227a1
  • PR: supabase/supabase-js#2336
  • Module: auth
  • Type: bug-fix (resilience)
What Changed

Session-storage reader returns null on JSON parse failure, treating corrupted entries as absent rather than crashing downstream.

Implementation Guidance (C#)

private Session? ReadSessionFromStorage()
{
    var raw = _storage.GetItem(_storageKey);
    if (raw == null) return null;
    try
    {
        return JsonSerializer.Deserialize<Session>(raw);
    }
    catch (JsonException)
    {
        return null; // Corrupted — treat as no session
    }
}
Key Behaviors to Match
  • Invalid JSON in session storage → null, not exception

Acceptance Criteria

  • Corrupted session storage returns null, not throws
  • Test verifies the behavior

Context

  • supabase-js version: v2.106.0
  • Related: SDK-1038 (dart), SDK-1039 (py), SDK-1040 (swift)
  • Parity tracking: Auto-generated by /sync-sdk-parity
Lenguaje dominante
C#
Estrellas
700
Forks
105
Merge medio
2 d 1 h
PR fusionados (30 d)
35

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de supabase/supabase-csharp

Todos los issues de supabase/supabase-csharp

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.