A cloud-based identity and access management service for securing user authentication and resource access
SFSafariViewController is not returning to iOS app
Hi,
I am working on the MSAL SSO login when I set the .safariViewController in webViewParameters and try to login then it is not returning to the iOS App, it just show DONE button on SafariViewController. I have also checked the other thread and everyone is saying that we need to use below line :=
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
print("Received Callback in App delegate (options) (url)")
return MSALPublicClientApplication.handleMSALResponse(url, sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String)
}
I have also added above code and my redirect url is also correct but still it is not working.
Can anyone help me on this issue.
Code : =
self.webViewParameters = MSALWebviewParameters(authPresentationViewController: self)
self.webViewParameters?.webviewType = .safariViewController
self.webViewParameters?.presentationStyle = .fullScreen
info.plist:==
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>msauth.$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>msauth</string>
<string>msauthv2</string>
<string>msauthv3</string>
</array>
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Identity Manager
A tool for managing user identities, credentials, and access across on-premises and cloud environments
2 answers
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
2 deleted comments
Comments have been turned off. Learn more
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more