[POST] /auth/token
if a user must move between domains, he will not need to login again as long as the token returned to him during login and registration is not expired
post the token for validation…
PARAMETERS:
user_id (buyer_id_encode) str
token str
cart_id INT
domain str. (ENUM(local,international,food,gas)) — domain from which you make this post
platform str. (ENUM(web,android,ios))
server_ip
So if you are in Ogwugo Food, and the user want to login from user dashboard, he click on ogwugo food link, the user dashboard will provide the link with token. in the url.. thus : https://food.ogwugo.com/login_page?token=hshghh&user_id&user_id=shjfh78g4cdt43g43hds
same apply for other domains including the user dashboard itself..
collect these query strings and post them to the token validation endpoint, if the token validation return success with user detail, log the user in..
SELLER TOKEN BASED AUTH
[POST] /auth/seller/token
PARAMETERS:
seller_id str (encoded version of seller id)
token str
domain str. (ENUM(local,international,food,gas)) — domain from which you make this post
platform str. (ENUM(web,android,ios))
server_ip
RESPONSE
{
“data”: {
“is_admin”: 1,
“seller_id”: 1,
“store_id”: 1,
“seller_email”: “[email protected]”,
“shipper_id”: 0,
“image_url”: “”,
“name”: “Okokoh Benjamin”
},
“status”: “success”,
“message”: “Authentication succeeded”
}