Hi, I’m fairly new to Ember and I want to have login with LinkedIn on my page. I’m currently using Torii with Emberfire for google and facebook authenticate, but when I make a request using linked-in-oauth2, I don’t receive any data, just an authorizationCode and my session variable gets set. I’d like to know if it’s possible to receive informations from the users profile.
I’m using simple-auth GitHub - simplabs/ember-simple-auth: A library for implementing authentication/authorization in Ember.js applications. in all my ember application. It’s easy way to adapt it to custom auth sites.
Actually, I’ve read something about simple auth having the same problem as torii, I can’t complete the authentication with LinkedIn’s API due to CORS problems. Seems like it’s API does not accept requests from client side. Any thoughts about how to solve this? It would help me a lot.
U need redirect to linkedin auth page then you’ll redirect to your app. Simple auth is build to use this kind of authentication.
I’m having trouble after the redirect (step 2) that gives me only the authorizationCode (the same I get with Torii), step 3 of this doc asks for a http post request to exchange the authorizationCode for an actual token. I have no clue on how do I bypass CORS. I’ve tried jsonp, but seems like linkedin accepts json only.
The final step towards obtaining an Access Token is for your application to ask for one using the Authorization Code it just acquired. This is done by making the following “x-www-form-urlencoded” HTTP POST request: