Skip to content

fix(auth): quick fix for Auth.User sendability error#1845

Merged
ncooke3 merged 2 commits into
mainfrom
nc/fix-auth-user
Apr 2, 2026
Merged

fix(auth): quick fix for Auth.User sendability error#1845
ncooke3 merged 2 commits into
mainfrom
nc/fix-auth-user

Conversation

@ncooke3

@ncooke3 ncooke3 commented Apr 1, 2026

Copy link
Copy Markdown
Member
/Users/nickcooke/Developer/quickstart-ios/authentication/AuthenticationExample/ViewControllers/UserViewController.swift:303:25: error: sending 'self.user.some' risks causing data races
        try await user?.delete()
                  ~~~~~~^~~~~~~~
/Users/nickcooke/Developer/quickstart-ios/authentication/AuthenticationExample/ViewControllers/UserViewController.swift:303:25: note: sending main actor-isolated 'self.user.some' to nonisolated instance method 'delete()' risks causing data races between nonisolated and main actor-isolated uses
        try await user?.delete()

@ncooke3 ncooke3 changed the title fix(auth): quick fix for Auth.User sednability error fix(auth): quick fix for Auth.User sendability error Apr 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the FirebaseAuth import in UserViewController.swift to use the @preconcurrency attribute, which addresses Swift concurrency warnings. The feedback suggests adding a TODO comment to track the removal of this attribute once the underlying SDK provides Sendable conformance for its types.

…ontroller.swift

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@ncooke3 ncooke3 requested a review from morganchen12 April 1, 2026 22:00
@paulb777

paulb777 commented Apr 1, 2026

Copy link
Copy Markdown
Member

Do we need documentation recommending customers do similar imports?

@ncooke3 ncooke3 merged commit 1894dd1 into main Apr 2, 2026
7 checks passed
@ncooke3 ncooke3 deleted the nc/fix-auth-user branch April 2, 2026 03:08
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.

3 participants