This operation is performed by:
- The Node.js server that renders the initial React.js application. This is not necessarily the same server as your API, but it may be depending on your setup.
- React Native applications upon opening the application.
- React web applications following successful OAuth authentication.
None. The API doesn't care about the body of this request.
--
The access token acts as a password for each request.
The client token is used to identify device (browser client, phone, tablet, etc) of the current session. This allows us to maintain multiple concurrent sessions across devices / browsers.
The unique identifier for the current user.
--
access-token: bgINB4atOxd8SMNvtOTDxg
client: V7EN7LSRYAbpE_-c5PvRSw
uid: test@test.com
--
This be an object containing the attributes that your API is configured to send describing your user. The attributes will be nested within a data
object. At a minimum, this should contain the following attributes.
Will always be true
.
This is the object that describes the user. It should contain at least the following params.
The user's unique identifier.
The provider used to create / verify the user's account (email, github, facebook, etc.).
--
{
"success": true,
"data": {
"id": 6,
"email": "test@test.com",
"provider": "email",
"uid": 'test@test.com',
"favorite_color": "yellow ogre"
}
}
--
The access token acts as a password for each request. Upon successful token validation, a new token will be issued and returned with the response. The previous token will be invalidated, and this new token should be used for the subsequent request to the API.
The client token is used to identify device (browser client, phone, tablet, etc) of the current session. This allows us to maintain multiple concurrent sessions across devices / browsers.
The time at which the token will expire.
The unique identifier for the current user.
--
access-token: bgINB4atOxd8SMNvtOTDxg
client: V7EN7LSRYAbpE_-c5PvRSw
expiry: 1450988710
uid: test@test.com
--
This will be an array containing any errors that the server encountered in processing the request.
Will always be false
.
A list of errors that will be displayed to the user.
--
{
"success": false,
"errors": ["User not found or access-token invalid."]
}
--
None. The client won't care about any headers for this response.