how to get a alert when an http request needs some credentials to be given in webview

Hello,

I am developing an app which has a webview embedded in it. We have our own AD server for authentication. After 2 url request, it automatically goes to an url that requests for credentials in safari browser. But in xcode it doen't. I need some tips where i can handle that request, add some credentials and then allow to procced. The response will have cookies based on that we classify customers. I have implemented it in WKwebview but the tokens from the active directory i not accessed. Please guide me as i am new to xcode development!!

i am expecting the same method like onhttpauthrequest in android in xcode!thanks in advance

This really depends on what sort of credentials the server is requesting. If it’s doing HTTP-level authentication, like Basic and Digest, you can catch the authentication challenge via the

webView(_:didReceive:completionHandler:)
navigation delegate callback. However, it sounds like the system you’re using is more complex than that, and it’s hard to recommend an approach without knowing more about how it works.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
how to get a alert when an http request needs some credentials to be given in webview
 
 
Q