dbrugne / donut

The donut server and browser based client
http://donut.me
0 stars 0 forks source link

"[InternalOAuthError: Failed to fetch user profile" #1149

Open dbrugne opened 8 years ago

dbrugne commented 8 years ago

web-49 (out): [2016-01-11 18:57:04.458] [WARN] web - [/home/donut/app/source/web-server/app/authentication/oauth.js] passport-facebook-token { [InternalOAuthError: Failed to fetch user profile] web-49 (out): name: 'InternalOAuthError', web-49 (out): message: 'Failed to fetch user profile', web-49 (out): oauthError: web-49 (out): { statusCode: 400, web-49 (out): data: '{"error":{"message":"Invalid appsecret_proof provided in the API argument","type":"GraphMethodException","code":100,"fbtrace_id":"CANrHQbo89b"}}' } } web-49 (out): InternalOAuthError: Failed to fetch user profile web-49 (out): at /home/donut/app/source/node_modules/passport-facebook-token/lib/index.js:148:32 web-49 (out): at passBackControl (/home/donut/app/source/node_modules/oauth/lib/oauth2.js:123:9) web-49 (out): at IncomingMessage. (/home/donut/app/source/node_modules/oauth/lib/oauth2.js:143:7) web-49 (out): at emitNone (events.js:72:20) web-49 (out): at IncomingMessage.emit (events.js:166:7) web-49 (out): at endReadableNT (_stream_readable.js:905:12) web-49 (out): at doNTCallback2 (node.js:441:9) web-49 (out): at process._tickDomainCallback (node.js:396:17)

dbrugne commented 8 years ago

Visiblement dù à une token dont la clé ne correspond pas à la bonne app facebook (test sur prod par exemple). Donc un truc peu probable en prod.

Le seul truc à corriger serait de retourner du JSON et non pas du HTML (issu de NGINX probablement) comme c'est le cas. En effet l'app mobile lève un warning "invalid token <...".