drudge / passport-facebook-token

Passport strategy for authenticating with Facebook access tokens using the OAuth 2.0 API.
MIT License
390 stars 80 forks source link

Authentication not working on remote URL #81

Open zvandervelde opened 7 years ago

zvandervelde commented 7 years ago

I can successfully authenticate with an access_token locally, but when performing the same action on remote url, it always returns 401 error.

Update: same server running on heroku works, not on AWS. Anyone run into this before?

smande00 commented 5 years ago

I know this is old - however, I ran into this as well. A common AWS setup is to run nginx as a reverse proxy for node. If you are also using a custom access_token header, nginx will not forward that header to node by default. You'll need to set underscores_in_headers on in the server section of the nginx config.