tramaLabs / rest

Trama platform REST API
https://trama-rest.herokuapp.com
3 stars 2 forks source link

Facebook auth secure #11

Closed diegohaz closed 7 years ago

diegohaz commented 7 years ago

Currently, we are accepting any Facebook access_token to authenticate the user, even if the access_token wasn't originated by our Facebook App.

This PR adds one more layer of security while authenticating through Facebook by sending a appsecret_proof to the Facebook Graph API.

The downside is we need to add two more environment variable: FB_APP_SECRET and FB_APP_SECRET_DEV (the last one comes from the fb test app).