p2 / OAuth2

OAuth2 framework for macOS and iOS, written in Swift.
Other
1.14k stars 276 forks source link

Fix issue starting`ASWebAuthenticationSession` on iOS 13+ #356

Closed cgossain closed 3 years ago

cgossain commented 3 years ago

Starting the ASWebAuthenticationSession on iOS 13 was triggering an error. Upon further investigation, it appears Apple has added a new protocol/property to ASWebAuthenticationSession called presentationContextProvider which is required to start the session.

This commit fixes the issue by providing a default implementation of the ASWebAuthenticationPresentationContextProviding protocol on all view controllers, and setting the presentationContextProvider property to the authorizeContext.

cgossain commented 3 years ago

Master branch is not building. Closing this PR, and will open a new one from a different starting point.