UIWebView not detecting redirection

I am creating a Login API using OAuth2 Workflow. The server supports OAuth2 authorization. I open an OAuth2 authorization url in a webview that looks likehttps://subdomain.domain.com/oauth2/authorize?client_id=ios-app&redirect_uri=<redirect-uri>&response_type=code

When the login is successfully completed on the server, it opens a page whose url is similar to https://subdomain.domain.com/oauth2/authorize?state=&code=<authorization-code>

To login, I need to extract this authorization code from the url and make an OAuth token request using that code as a parameter.

I am trying to intercept a webView:shouldStartLoadWithRequest:navigationType:

webview using the UIWebView delegate method . But this delegate method doesn't fire when a redirect occurs. I have set the webview delegate toself

How do I detect this redirect so that I can intercept it and extract the code from the URL?

+3
ios objective-c oauth uiwebview


source to share


No one has answered this question yet

Check out similar questions:

3
FIREARE KeyRock token access request error while implementing iOS client
3
After logging into Instagram in my iOS app, how can I log in as a different user?
3
Login with Tumblr to UIWebView
3
Pinterest OAuth API not redirecting?
3
Error loading UIWebView with custom url scheme
1
Non-standard NSURL schema
1
Google OAuth 2.0 Titanium API: Missing required parameter: response_type
1
How to get server response code for each request in WebView
1
Getting error while fetching uber authentication token
0
OAuth2 in iOS app loads uiwebview to let user accept connection



All Articles
Loading...
X
Show
Funny
Dev
Pics