dreamfactory: Missing email parameter after FB oauth_callback POST request
Hi,
I’m implementing FB OAuth login in self hosted DF instance. I’m following the tutorial linked here: http://wiki.dreamfactory.com/DreamFactory/Tutorials/Using_OAuth
When I make the API call to:
POST https://your-url/api/v2/user/session?oauth_callback=true&{extracted_query_string_from_callback}
I get status 400:
{"error":{"code":400,"context":null,"message":"Login request is missing required email.","status_code":400}}
As far as I understand, I shouldn’t provide any email. It looks to me as if the request is misinterpreted as some another kind of login type.
Same issue is mentioned here but no response was given. http://community.dreamfactory.com/t/log-in-with-facebook-does-not-work/3480
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (5 by maintainers)
Ok to wrap it up. Yes, FB OAuth can work with native iOS App.
fb<app_id>://authorize/user/session?service=fb_oauth(add headers: X-Dreamfactory-API-Key: <df_api_key> X-Requested-With: XMLHttpRequest (this is to get json with FB url instead of being redirected) 3.2 Use the returned URL to open webview with FB auth screen 3.3 After successful login FB will redirect to fb<app-id>😕/authorize/<params>. You should react to that in you AppDelegate methods and retrieve all the params. NOTE: On success the params are ‘?’ and on failure with ‘#’. 3.3. POST touser/session?oauth_callback=true&<all params from fb>(there should becodeandstate) 3.4 You shoud get back session info from DF withsession_tokenyou can store and make next callbacks with it as a header or param.access_tokenrelated error.Thanks for all the help.
You can turn on debugging in your environment using the .env file that’s in the root directory of your DF installation. Set the following in your .env file
This should give you more details on the error with PHP stack trace.