feat: Swift 6 strict concurrency compliance for WebAuth Part 2#1138
Open
sanchitmehtagit wants to merge 4 commits intodevelop/v3.0from
Open
feat: Swift 6 strict concurrency compliance for WebAuth Part 2#1138sanchitmehtagit wants to merge 4 commits intodevelop/v3.0from
sanchitmehtagit wants to merge 4 commits intodevelop/v3.0from
Conversation
sanchitmehtagit
commented
Apr 8, 2026
Contributor
Author
sanchitmehtagit
left a comment
There was a problem hiding this comment.
Update Examples.md
sanchitmehtagit
commented
Apr 8, 2026
| > .start { result in ... } | ||
| > ``` | ||
| > | ||
| > Or reassign the return value when you need to configure conditionally: |
Contributor
Author
There was a problem hiding this comment.
Line 216 in 116f8f9
NandanPrabhu
approved these changes
Apr 9, 2026
NandanPrabhu
reviewed
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continues from #1123. Completes Swift 6 strict concurrency compliance for the WebAuth layer.
handles this : #1134
Changes
Auth0WebAuth—final class→structstructto satisfySendableconformance without@unchecked Sendablevar copy = self)lazy var redirectURLreplaced with a computed property backed by_redirectURL—lazy varis notSendable-safe on structs and would cache a stale URL ifuseHTTPS()was called after first accessnonceremoved as a mutable stored property; now computed fromparameters(or generated randomly if absent), consistent with howstateis handledbarrieris nowlet(immutable, safe to share across concurrency domains)onCloseCallbacktype updated to@Sendable @MainActor () -> VoidpresentationWindowproperty added for multi-window supportWebAuthprotocolSendablestart()andlogout(federated:)marked@MainActoronClose(_:)callback parameter is now@SendableASProviderasProvider(...)factory marked@MainActor; acceptspresentationWindowparametercompletionHandlerwrapped inTask { @MainActor in }for safe actor hopASUserAgentconverted tofinal classwithSendableconformancecurrentSessionandpresentationWindowmarked@MainActorstart()andfinish(with:)dispatch viaTask { @MainActor in }Barrier/LoginTransactionBarrierprotocol now inherits fromSendable;QueueBarrierconforms via@unchecked SendableFinishTransactiontypealias updated to@MainActor @SendableCombine
start()publisherTask { @MainActor in }wrapper — the callback-basedstart(_:)already dispatches to@MainActorinternally; now consistent with how thelogout()publisher is implementedMigration guide (
V3_MIGRATION_GUIDE.md)Sendablerequirement for customWebAuthconformances and the value semantics change — simplified around two clear cases: chaining (no change needed) vs imperative calls (must reassign return value)WebAuthProvider— now@Sendable @MainActor" to the typealiases sectionTest plan
-strict-concurrency=complete/ Swift 6 mode — no concurrency warningspresentationWindow(_:)presents the browser in the correct windowWebAuthmock/test double compiles after addingSendableand@MainActor