Reputation: 23
We have a Xamarin iOS app which uses the Blackberry dynamics iOS Xamarin SDK v10.0.0.19. We recently changed our authentication process from basic auth to oAuth, which somehow does not work as intended.
We use a "ASWebAuthenticationSession" to launch an internal browser window with the oAuth login page as described here: https://developer.apple.com/documentation/authenticationservices/authenticating_a_user_through_a_web_service
In the Blackberry documentation it says that this way is supported by the SDK since version 9: https://docs.blackberry.com/en/development-tools/blackberry-dynamics-sdk-ios/9_2/blackberry-dynamics-sdk-ios-devguide/What-is-the-BlackBerry-Dynamics-SDK/xwk1489609883176/Password-and-app-lock-options
The problem is that after successful authentification on the oAuth login page it never closes and goes back to the main app like it normally should. It works in our non-Blackberry version which uses the same code base. I suspect that the WebView does for some reason not allow to call the custom callback url scheme that opens the main app and delivers the token. For testing I loaded a page with links to custom url schemes instead of the oAuth page and it does not seem to actually call any of them, even those not used for our own app.
The custom url scheme is correctly registered in the info.plist of the app and for example from the safari browser on the same device I can open the app via that url scheme without problems. Also, as a workaround I found that authentification via oAuth works when I just launch the url in the external Blackberry Access browser. It then correctly calls back to the app with the token. Any idea why it does not work with the embedded browser using ASWebAuthenticationSession?
Upvotes: 1
Views: 113
Reputation: 21
Have you tried applying the later version of the BlackBerry Dynamics iOS SDK - v10.1.0.36? The newer build might have addressed the issue.
https://developers.blackberry.com/us/en/resources/downloads
If that doesn't resolve the issue, please contact BlackBerry Support Team to investigate further.
Upvotes: -1