AppAuth-iOS icon indicating copy to clipboard operation
AppAuth-iOS copied to clipboard

Allow using a background queue with OIDAuthState

Open ja-caperwhite opened this issue 3 months ago • 0 comments

This commit is related to this issue: https://github.com/openid/AppAuth-iOS/issues/667, which we also ran into.

The problem was that OIDAuthorizationService's performTokenRequest still dispatched a lot of callbacks on the main dispatch queue, which in turn caused a deadlock for us when calling OIDAuthState's performAction.

This change allows setting a queue for OIDAuthState to use when calling performTokenRequest.

This change does not make OIDAuthState thread safe. The default behaviour stays as is, expecting the user to use the main thread. If a queue is specified, all method calls on the OIDAuthState then also need to be dispatched from that queue to avoid potential threading issues.

ja-caperwhite avatar Oct 31 '25 12:10 ja-caperwhite