AppAuth-iOS
AppAuth-iOS copied to clipboard
Allow using a background queue with OIDAuthState
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.