0

Good afternoon, I am creating an application in Cordova and wanted to use linkedin, but when I run my application, it says I need to set my domain javascript API in my Application linkedin. I've tried with the domain "file: ///" but gives the same error. Does anyone have an idea or a solution to this problem?

Best Regards

1 Answers1

-1

LinkedIn (or any OAuth provider) requires your Web domain for security purposes (to know the right URL for authentication callbacks, and to help prevent random sites from trying to impersonate your application).

You must supply a domain such as www.yourdomainname.com or even your external IPv4 address will work, such as 55.55.12.12.

gknicker
  • 5,509
  • 2
  • 25
  • 41
  • Yes I know I have to provide my domain, however my domain in my cord application is file: /// and this does not work on linkedin. On my computer with the localhost works but when intalo the app on my phone gives error. Best Regards – Mário Ramalho Jan 30 '15 at 09:30
  • It doesn't make sense that your domain is `file:///` when you're able to make requests over the Internet. Obviously you have an IP address, else you would not be able to communicate over the Internet. LinkedIn expects your requests to come from a fixed IP, so you may not be able to request directly from mobile device. – gknicker Jan 30 '15 at 16:24
  • Obviously you have an IP address! But you can't just put a fixed IP address on the API Domain because it will only work for that address. If you have a server based app you make a request from the server domain and even it's IP address may change, so how can you do it from an app or a unfixed address? – Mário Ramalho Jan 30 '15 at 17:10
  • Exactly. OAuth providers expect your requests to come from a server. It is expected you provide a permanent, Dev, Test, or Production server domain. – gknicker Jan 30 '15 at 17:15
  • But my problem is that I do not know what is that my server domain. I thought it was the file: ///.... !!! how can I discover it? – Mário Ramalho Jan 30 '15 at 17:33