Skip to content

fix: make supabase_auth_ui WASM compatible - #181

Merged
spydon merged 1 commit into
mainfrom
fix/wasm-compatibility
Oct 20, 2026
Merged

spydon merged 1 commit into
mainfrom
fix/wasm-compatibility

Conversation

@spydon

@spydon spydon commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

pub.dev scores supabase_auth_ui 10/20 on platform support. Pana gives a partial score when a package supports Web but is not WASM-ready. The only thing blocking WASM was this import chain:

supa_socials_auth.dart → sign_in_with_apple → sign_in_with_apple_platform_interface → method_channel_sign_in_with_apple.dart → dart:io

The latest sign_in_with_apple (8.2.0) still imports dart:io, so upgrading doesn't fix it.

Changes

  • Move every use of sign_in_with_apple into lib/src/utils/native_apple_sign_in.dart. It exposes getNativeAppleCredential and isNativeAppleSignInCanceled.
  • Add native_apple_sign_in_stub.dart with the same API, and import it conditionally (if (dart.library.io)) from supa_socials_auth.dart.
  • On web, behavior is unchanged: native Apple sign in only ever ran on iOS and macOS, and web always used signInWithOAuth.

Verification

Local pana run on this branch:

  • Platform support: 20/20, tagged is:wasm-ready
  • All other sections at full points
  • flutter analyze and flutter test pass

@spydon
spydon merged commit f7c98dc into main Oct 20, 2026
7 checks passed
@spydon
spydon deleted the fix/wasm-compatibility branch October 20, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant