OGWUGO API DOCUMENTATION

  1. Home
  2. Docs
  3. OGWUGO API DOCUMENTATION
  4. Main Server Documentation
  5. SOCIAL LOGINS

SOCIAL LOGINS

Method POST:

// collect social auth keys from endpoint:

/api/v2/app/social/list/keys

// GOOGLE LOGIN, BASED ON oauth2/v3/tokeninfo

Facebook authentication API use graph api version 2.8, require public key.

Obtain your-app-id from ogwugo Admin, use it to query facebook .

https://developers.facebook.com/docs/facebook-login/web/

https://www.codexworld.com/login-with-facebook-using-javascript-sdk/

returns user details as per login process and sets sessions for user for web api use..
process: authenticate facebook login via facebook javascript/others API then post the data to the endpoint
the facebook login will register the facebook user or log the user in if already exist. also if the user email already exist, it will bind both data together
// FB.api(‘/me’, {locale: ‘en_US’, fields: ‘id,first_name,last_name,email,link,gender,locale,picture,birthday’},

FACEBOOK
Path:

/auth/social/facebook
facebook  returned parameters DataType [default] Detail
client_id str. req
email email reg
picture str. (image url) reg
first_name str. reg
last_name str. reg
gender str. reg

the above data from facebook must me posted

Auth data DataType [default] Detail
cart_id int. req
platform (ENUM(web,android,ios)) reg
domain (ENUM(local,international,food,gas)) reg

GOOGLE Path:

/auth/social/google
google  returned parameters DataType [default] Detail
id_token str. req
email email reg
picture str. (image url) reg
name str. reg
cid str. client unique id

the above data from google must me posted

Auth data DataType [default] Detail
cart_id int. req
platform (ENUM(web,android,ios)) reg
domain (ENUM(local,international,food,gas)) reg
Was this article helpful to you? Yes No

How can we help?