Skip to content

parity(auth): accept uppercase UUIDs in UUID validation [from supabase-js] #1649

Description

@grdsdev

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: Dart implementation needed

A change was made in supabase-js that needs to be implemented in this repository for SDK parity.

Reference Implementation (supabase-js)

What Changed

The UUID validation helper used a lowercase-only regex, rejecting otherwise-valid uppercase UUID strings (e.g. as sometimes returned by external identity providers or databases). Fixed by adding the case-insensitive flag to the regex.

Code Reference

-const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/
+const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i

Implementation Guidance

Expected API Surface

supabase-flutter's packages/supabase_common/lib/src/uuid.dart has RegExp(r'^[0-9a-f]{8}-...') with no i flag/case-insensitive option per prior investigation — add case-insensitivity (Dart RegExp(pattern, caseSensitive: false)) to validateUuid.

Key Behaviors to Match

Uppercase UUID strings pass validation identically to lowercase · Mixed-case UUID strings also pass

Acceptance Criteria

  • Feature/fix implemented matching supabase-js behavior
  • Public API follows Dart naming conventions and idioms
  • Unit tests cover happy path and edge cases
  • Documentation updated
  • No breaking changes to existing API (or clearly documented)

Context

  • supabase-js version: v3.0.0-next.29
  • Parity tracking: This issue was auto-generated by SDK parity analysis

Generated with Claude Code /sync-sdk-parity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions