MEAN stack Facebook authorization error: No 'Access-Control-Allow-Origin' header? MEAN stack Facebook authorization error: No 'Access-Control-Allow-Origin' header? express express

MEAN stack Facebook authorization error: No 'Access-Control-Allow-Origin' header?


I'm not sure if this solves your problem but i recently went through something similar trying to make a facebook log in for an angular app. make sure in your facebook app setting page,

https://developers.facebook.com/apps/{your_app_id}/settings/   

change the "Site URL" to whatever your local host is.for example:

http://localhost:8080/


hello I'm not sure if this help you try

    app.config(['$httpProvider', function ($httpProvider){      $httpProvider.defaults.useXDomain = true;   // $httpProvider.defaults.cache = true;      $httpProvider.defaults.withCredentials = true;   // $httpProvider.defaults.xsrfCookieName = '';   // $httpProvider.defaults.xsrfHeaderName = '';      delete $httpProvider.defaults.headers.common['X-Requested-With'];}]);


You can't make an ajax request to a different address. Even if the address is the same and the port is different, you'll have "same origin policy" problems.

You can do it using nginx and redirecting the request with proxy_pass.

Check:http://distinctplace.com/infrastructure/2013/10/14/internal-redirect-to-another-domain-with-proxy_pass-and-nginx/

something like

server{  listen 80;   server_name localhost;  location /auth/facebook/request {    proxy_pass http://(...)facebook.com/(...);  }}