OAuth 2.0: failing to callback (facebook/google/custom authback)...post authentication via one of the oauth engines...following the oauth 2.0 module instructions...

0
hi...I have followed the instructions provided in the module (https://appstore.home.mendix.com/link/app/1414/)...now, post successful authentication via facebook or custom oauth module (independently developed in-house), it gives a callback error... http://localhost:8080/callback/facebook?code=AQC1JTD385-X-dAJDE_FD40b484cZzZlXSy1mg92ysmz7NM0aD4rkwT_D5sjJthqdGStvo0t8jbFXRLKTE26gSk9JJJ3qwrSEx8nrwD-jtFfcS8uw1K9UgjwTYofrGmpCDdsiKy0r0skWaM0jvYSXpJtzpXDYG11AGcS2d7SFkMxiSLLpkKHnGCa5t64ZFaDmzQMpFuMTxyvs9rO3IfYHhfoPzIZBZAKgN6g1h9EttM5tNggz_Z8eA01a0vRlOlsSC0i1DsITYpErbtCciBNoQSla15WasCTwmaDZ6H619Wq53qs96YNqnZUnSV95Xz87SM&state=1b0ef2e6-9829-4277-9c44-3c1405d184e1#_=_ error is: HTTP ERROR 500 Problem accessing /callback/facebook. Reason: Exception occurred while processing request can someone help ??  
asked
2 answers
0

To verify that the solution below applies in your case turn on the OAuthCallback and OauthCallBack logging on trace level.

The json response probably does not contain the email field that is setup in the configuration, but only a name and id.

If this is the case then change the constant UserInfoURI_Facebook to 

https://graph.facebook.com/me?fields=id,name,email&access_token=

To test if this works goto https://developers.facebook.com/tools/explorer/348496708652246/

to test the results you would get from the userinfo call.

Another issue might be that FB only returns verified mail addresses and other privacy settings might prevent the address to be returned.

Hope this helps in authorizing your users with their FB account

answered
-1

Hello Darshan, 

Error 500 is an internal server error - you will have to debug your Java code to find out what it is.

Hope this helps.

answered