Wednesday, 15 June 2011

node.js - AngularJS, Use passport without redirect/refresh on server side -


I am using nodjs, angulars and passports and trying to use google + login using my .

In the example I have added 2 routes:

  • / auth / google:
  • / auth / google / callback
  • < / Ul>

    In addition to this I saw that those routes are called through a link:
    & lt; A href = '/ auth / google / & gt; Sign in to Google & lt; / A & gt;

    What is the function in my app?

    However, I wanted to call the collier's way to avoid redirection - which means:

      $ When I tried to do it, Violation error has occurred  

    "No 'access-control-permission-origin' header exists on requested resource"

    (CORS rules added to my NodesJS server Had gone).

    Is this a way to use $ http should not redirect to back-end and not?

    from $ HttpProvider

      angular.module ('ngdemo') .config (['$ httpProvider', function ($ httpProvider) {$ httpProvider.defaults.useXDomain = true; Delete $ HttpProvider.defaults.headers.com ['Ex-Requested-To'];}]); For more information,  


No comments:

Post a Comment