Google Authentication

POST /api/auth

Body:

{
	"token": string,
	"clientId": string,
	"table": string, // "Riders", "Drivers", or "Dispatchers"
	"email": string
}

Response:

{
	"jwt": string
}

JWT after decoding:

{
	"id": string,
	"userType": "Rider" | "Driver" | "Dispatcher"
}

To use this JWT token, attach it to any request in the Authorization header, following the form:

{
	"Authorization": "Bearer <token>"
}

Riders

Get a rider

GET /api/riders/<id>

Response: All fields in the document of the specified Rider

Get all riders

GET /api/riders

Response: All documents in the Riders table in an array accessed with key "data"

Get a rider's profile information