I’m working on an iOS application where I need to open the Microsoft Authenticator app and directly prompt the user to enter an verification code immediately. now my code opening the authenticator but not showing popup same like we open app directly or navigate from notification. Here’s the swift code I’m using to open the Microsoft Authenticator app:
public static func openMicrosoftAuthenticatorForAuthentication() {
let clientID = Constants.microsoftClientID
let urlString = "msauthv2://(clientID)"
guard let url = URL(string: urlString) else {
print("Failed to create URL for Microsoft Authenticator.")
return
}
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: { success in
if success {
print("Microsoft Authenticator was opened successfully.")
} else {
print("Failed to open Microsoft Authenticator.")
}
})
} else {
print("Microsoft Authenticator is not installed or the URL scheme is incorrect.")
}
}
Really need to know if there’s a direct URL scheme approach to achieve this.
need solution for android and ios,
is there any other solution to automate the verification process?