7

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!

Manikandan C
  • 668
  • 1
  • 9
  • 22
Sumitk
  • 1,485
  • 6
  • 19
  • 31

2 Answers2

2

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

Community
  • 1
  • 1
Hans Z.
  • 50,496
  • 12
  • 102
  • 115
0

For authentication in LinkedIn oauth 2.0, your redirect url should be like this: https://com.testapp.linkedin.oauth/oauth

Axifive
  • 1,159
  • 2
  • 19
  • 31