Reputation: 384
I have an iOS application which has OAuth2 enabled login. The mobile app tried to get a oauth2 token from WSO2 Identity Server. When the app tries to communicate WSO2 Oauth Authentication end point, it fails to trust the wso2 identity server certificate and app closes by design.
I tried changing the Identity Server certificate by generating a new self signed certificate using IOS. But the problem still persists. BTW in the self signed certificate, I am having my IP address as the CN name.
Upvotes: 1
Views: 358
Reputation: 379
To allow the application to connect to sources with untrusted certificates you have to add the following to the Info.plist.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
FYI, WSO2 IS has an IOS sample application to check SSO https://is.docs.wso2.com/en/latest/learn/single-sign-on-for-native-ios-applications-with-wso2-identity-server/#single-sign-on-for-native-ios-applications-with-wso2-identity-server
Upvotes: 1