passport.js - Setting up Passport - LinkedIn OAuth2.0 Strategy; Cannot see Authorization page loaded -


i new developing spa. have using angularjs , nodejs passport. have succesfully implemented localstrategy. trying : , linkedinstrategy = require('passport-linkedin-oauth2').strategy

when attempt login request, receive following error: xmlhttprequest cannot load

"http://localhost:8000/login/linkedin. request redirected       'https://www.linkedin.com/uas/oauth2/authorization?state=some%20state&respon…  %2fcallback&scope=r_emailaddress%20r_basicprofile&client_id=7708er3z2xorot'" 

, disallowed cross-origin requests require preflight.

if manually click on link show me authorization page; also, notice in linkedin api request count going up, cannot authorization page appear?

i found out had done wrong , wanted share correction , solution:

originally, making $http.get call (using angularjs) client server (nodejs). server called function called passport.

instead set window address $window.location.href = myserverroutelinkedin

   $scope.loginoauth = function (provider) {         $window.location.href = environment.apiauthentication + '/login/' + provider;     } 

hopefully, may else.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -