# Configuration of an OAuth service accessing a DB with Google/FB account

**URL:** <https://community.dreamfactory.com/t/configuration-of-an-oauth-service-accessing-a-db-with-google-fb-account/2330>\
**Category:** Authentication & Security\
**Created:** [March 7, 2016, 3:05pm UTC](https://community.dreamfactory.com/t/configuration-of-an-oauth-service-accessing-a-db-with-google-fb-account/2330 "2016-03-07T15:05:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sven\_Steudter](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@Sven\_Steudter](https://community.dreamfactory.com/u/Sven_Steudter)\
**Post date:** [March 7, 2016, 3:05pm UTC](https://community.dreamfactory.com/t/configuration-of-an-oauth-service-accessing-a-db-with-google-fb-account/2330/1 "2016-03-07T15:05:43Z")

</div>

Hi,

I have read the wiki links as well as the discussions here in the forum. But i am still unable to configure Df 2.1.0 in such a way, that a user can for example access a db table or is logged in in DF.

I have setup a Google developers account and the same for FB. There I get a clientId and a clientsecret and have to set the redirectUri (which I set to something like h ttp://myurl/.?service=google).

I have also set up a role for accessing ALL and a service with OAuth Google setting clientId + clientsecret + redirectUri (=h ttp://myurl/?service=google)

If I surf in browser to [http://myurl/?service=google](http://myurl/?service=google) I am redirected to Google login, accept it and Ia forwarded to DF login screen. I am not logged in. If I try it with cUrl, I get a redirect to Google, I open the url in a browser accept it, check in developer tools of the browser for the “code” param and create a new POST message to h ttp://myurl/api/v2/user/session?oauth\_callback=true&code=[MY-COPIED\_CODE\_GOES\_HERE]. Then I get an error stating that “Login request is missing requiered email.”

What am I doing wrong here? I would have expected, that I am logged in, or at least see some tokens.

Best,  
Sven

---

<div class="post-metadata">

**Author:** ![navjinder](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/navjinder/32/313_2.png) [@navjinder](https://community.dreamfactory.com/u/navjinder)\
**Post date:** [March 6, 2018, 9:43pm UTC](https://community.dreamfactory.com/t/configuration-of-an-oauth-service-accessing-a-db-with-google-fb-account/2330/2 "2018-03-06T21:43:19Z")

</div>

I am also getting the same issue Error 400 Login request is missing required email. Could you please confirm if we need to add [https://your-url/api/v2/user/session?oauth\_callback=true&code={extracted\_query\_string\_from\_callback}](https://your-url/api/v2/user/session?oauth_callback=true&code=%7Bextracted_query_string_from_callback%7D) or just POST [https://your-url/api/v2/user/session?oauth\_callback=true&{extracted\_query\_string\_from\_callback}](https://your-url/api/v2/user/session?oauth_callback=true&%7Bextracted_query_string_from_callback%7D)?
