Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LinkedIn OAuth2.0 redirect url for iOS app without http or https

I think this might be a very simple setting issue and since I am very new to swift and LinkedIn API I might be doing this wrong:

I am making an iOS app with swift and want to use LinkedIn to authenticate. For that, I created an application on LinkedIn Developer Network. But now I am not able to put my app redirect URL in OAuth 2.0 Redirect URLs:

The app redirect URL in my code looks like oauth-testapp://oauth-callback/linkedin and its working fine with OAuth 1.0 but for OAuth 2.0 I need to have this in http:// or https:// format.

This is where my confusion is as I cant add my URL oauth-testapp://oauth-callback/linkedin in OAuth 2.0 Redirect URLs:

enter image description here

I read some posts like this and this and I don't want to create a website to redirect the user to the app or create a web view inside the app. I mean I can do it but I just want to make a POC and this is where I am blocked on. Is it at all possible without these methods? Has anyone done it with swift? Thanks a lot for your help guys!

like image 758
Sumitk Avatar asked Dec 29 '14 21:12

Sumitk


People also ask

How do I redirect on LinkedIn app?

To request a user for access, redirect the user to LinkedIn's authorization page when he clicks on Sign in using LinkedIn link or button, where the user either accepts or denies your application's permission request.

What is a OAuth 2.0 redirect URI?

A redirect URI, or reply URL, is the location where the authorization server sends the user once the app has been successfully authorized and granted an authorization code or access token.

Are you already using LinkedIn's new OAuth UI?

If your application has implemented LinkedIn's OAuth 2.0 UI within the past year, it is likely you are already using the new OAuth 2.0 UI and no further action is required. What's new?

How do I authenticate to LinkedIn API?

Authenticating with OAuth 2.0 Overview. The LinkedIn API uses OAuth 2.0 for user authorization and API authentication. Applications must be authorized and authenticated before they can fetch data from LinkedIn or get access to member data. Follow one of the two authorization flows in Permissions to get started.

What is code state in LinkedIn OAuth?

code — The OAuth 2.0 authorization code. state — A value used to test for possible CSRF attacks. The code is a value that you will exchange with LinkedIn for an actual OAuth 2.0 access token in the next step of the authentication process.

How do I authorize an iOS app to connect to LinkedIn?

Authorizing an iOS app to LinkedIn and performing certain operations based on the provided APIs can be achieved in two different ways. The first one is to use the OAuth 2.0 protocol that is supported by LinkedIn.


1 Answers

You'll have to create a webview inside the app - it's not that hard and you'll need to trigger a browser anyhow - and override the behaviour for this specific (redirect URI) callback URL as described in: Oauth 2.0 authorization for LinkedIn in Android

like image 118
Hans Z. Avatar answered Oct 09 '22 14:10

Hans Z.