My server is configured on AWS and runs on the expess web server. He is configured with a passport.
In the interface, I want all users to log in through linkedin. When they click the button, it issues the http GET command using the angular $ http.get service. The main workflow that I am trying to achieve is as follows:
1) The client opens the application and clicks on it with a link, and a request for receipt is issued on the backend express server
2) The express server uses the passport data to bind to oauth2 authentication, which subsequently redirects the request to the associated server
3) The Linkedin server then responds to the client with a login page in response to a client request
4) Once the page in step 3 is successfully verified with the user credentials, the access token is sent to the express server, since I configured the URL of the redirected link to it.
5) Then the express server receives the user profile data, and then sends a few data to the client.
Since I use the ionic structure, I would like to receive the data, and then load the page defined in the ionic templates folder (locally for the external interface) and fill it with the data received from the server in step 5.
To do this, I try to issue a $ http.get request that does not work with error: 404 in Step 2 .
$http.get('http://www.example.com:3000/auth/linkedin/').
success(function(data, status, headers, config) {
console.log('success');
}).
error(function(data, status, headers, config) {
console.log('failure '+data+', ' +status +', '+headers+', '+config)
});
This produces:
"failure , 404, function (name) {
"use strict";
if (!headersObj) headersObj = parseHeaders(headers);
if (name) {
return headersObj[lowercase(name)] || null;
}
return headersObj;
}, [object Object]"
, .
, , window.location('http://www.example.com:3000/auth/linkedin/'). linkedin -. 4. 5, , .