Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onReceivedHttpAuthRequest is not called in IOS #583

Closed
4 tasks done
miladasfa opened this issue Nov 10, 2020 · 3 comments
Closed
4 tasks done

onReceivedHttpAuthRequest is not called in IOS #583

miladasfa opened this issue Nov 10, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@miladasfa
Copy link

Description

I have created an app to load the website using NTLM for authentication. i am using onReceivedHttpAuthRequest to proceed with the authentication. it is work perfectly in Android, but onReceivedHttpAuthRequest is not called in IOS.

onReceivedHttpAuthRequest: (InAppWebViewController controller, HttpAuthChallenge challenge) async {
return re=HttpAuthResponse(username: _userName, password: _password, action:
HttpAuthResponseAction.PROCEED, permanentPersistence: true);
}

I will really appreciate if anyone can help m e on this issue.

Thank you.

@miladasfa miladasfa added the bug Something isn't working label Nov 10, 2020
@albatrosify
Copy link
Contributor

Oh interesting, I was just thinking about opening a bug for this. I am deeply in trouble right now, as I am using headlessInAppWebView for navigating through pages to grab data for my app. However in some occasions I need NTLM.
I thought this was not possible at all with inappwebview, but interesting that you say it works on android.

I hope this can be fixed in near future, as this is completely rendering InAppWebView useless for me right now. :(

@albatrosify albatrosify mentioned this issue Jan 6, 2021
1 task
@ricardonogpereira
Copy link

Hello, I also had the same problem in NTLM authentication in IOS and the method was not started due to the absence of calls: NSURLAuthenticationMethodNegotiate and NSURLAuthenticationMethodNTLM.
I located the swift file that makes this call that is on the path: flutter_inappwebview / ios / Classes / InAppWebView.swift
When adding locally for testing, it worked!
...
public func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {

    if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodHTTPBasic ||
        challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodDefault ||
        challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodNegotiate ||
        challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodNTLM ||
        challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodHTTPDigest {

....
Getting something like above.
I have already notified the developer to evaluate include this and have this verification.
Thanks
Ricardo Nogueira

Copy link

github-actions bot commented Nov 8, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants