How to use the service oauth (DF 2.0)

I’m doing some tests in the dream factory 2 and spotted the possibility of setting up a service (in dream factory panel) of oauth (twitter, facebook, github and google).

I set up initially with Facebook but does not have anything in api_docs.

Is there any reference document to use this service?

I recommend checking out the Facebook OAuth tutorial.

1 Like


Thank you, I managed to start the integration of my app.

I could configure the service and already with the vendor code (Facebook).

My question is as to how to complete the field query_string_from_callback_containing_authorization_code_and_service_name the URL below.



After a few more hours of analysis could access the url.

If it is like this:


Hi - I am having the same issue I believe, but your solution didn’t work for me. Is there an update on this? Please see my calls below:

curl -i -k -X POST

return a facebook location i.e.

Once I sign in on facebook I get sent here:

I then take the code and service and call:

curl -i -k -X POST

But I get the following error message (short):

Login request is missing required email.

Any input is helpful! Thanks!

This is a cURL limitation, not processing/passing the special characters in the code you’re passing. Wrapping it in single quotes should resolve this. E.g.,

curl -i -k -X POST ''


I am not able to follow this workflow here. What I have done so far:

  • created a service for Google and Facebook OAuth
  • created a role which has access rights for everything
  • downloaded and installed the JS demo app AddressBookForJavascript and run it in apps

What do I want to achieve?
One of these:

  • Login in Dreamfactory with FB or Google
  • Login in the demo app
  • Access SOMETHING like …/api/v2/user/session

What works so far is, that when I click on the login button for Google on the DF login page, I am redirected to Google, where I can grant the access. I am redirect to whatever I configured as redirect_url (e.g. …/files/AddressBookForJavascript/add_javascript/index.html?service=goolge or …/?service=google or /api/v2/user/session?service=google)

In the redirected url the adress contains infos like code and state session_state and authuser=0. But I am not logged in.

In my opinion, when I got redirected back to DF after granting the request in Google, DF should take the grant token and exchange it in an access token, which does not seem to happen.

Also the curl example above is not working for me.The first three steps are easy, but how do I login in in Facebook or Google with curl? I have taken the Google Location and used it in a browser, acceprted it and have taken the code from there and continued with the next crul step, but same result, I have no access to …/api/v2/user/session?service=google, DF complains that no session is set in this case.

Any advice what I can check for using OAuth in DF to give access rights to users? Just some mor Infos I am using the Bitnami stack of DF 2.1 and I have not configured any “Service Definition” with Swagger. I am sticking to the Facebook docu and to to posted comments on this page.

The BitNami stack for DF 2.1.0-4 has not set the CA root certificates in PHP. Copy n pasting the certs and declaring the file location in php.ini fixed the issue.