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:
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!
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.
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.
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?
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With