Skip to content
This repository has been archived by the owner on Sep 27, 2018. It is now read-only.

Authentication

Budi Syahiddin edited this page Dec 24, 2017 · 2 revisions

How it works?

User login to facebook on their mobile app -> Sends FbToken -> Server Validates FbToken with Facebook -> If Valid, Server returns JWT to user. Under the hood, the server will get data from facebook to store in database if user is not in the database

URL: localhost:8080/api/v1/login

Method: GET

Required params: fbToken

Success Response:

{
    "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBdXRoZW50aWNhdGlvbiIsImlzcyI6Ik1zb2NpZXR5IiwiaWQiOiJEQTQ0OEJGMUQ2QzJDNThEMUNGMDhFREIzOUI0RkEyOEI3MURERDhFQzRENUY2NTkyODdBOERCMUZGOTU1OTREIiwiZW1haWwiOiJnaG9zdG9wczFAaG90bWFpbC5zZyJ9.3YA0oduJc18SDY9SKmUn-GsRcXnKM9rWfGk8n8u9amc",
    "expiry": "Dec 25, 2017 1:49:02 PM"
}

Error Response: Nothing

  • Code: 401 Unauthorized
Clone this wiki locally