Comment on page
Login with Facebook
HTTP Method | URL | Requires Auth |
---|---|---|
POST | /api/v1/login | no |
Key | Example Value | Description |
---|---|---|
serviceName * | facebook | The desired OAuth service name. In this case, facebook . |
accessToken * | hash | Access token provided by Facebook oauth. |
secret * | hash | The secret provided by Facebook. |
expiresIn * | 200 | Lifetime of token (in seconds). |
curl -H "Content-type:application/json" \
http://localhost:3000/api/v1/login \
-d '{
"serviceName": "facebook",
"accessToken": "hash",
"secret": "hash",
"expiresIn": 200 }'
{
"status": "success",
"data": {
"authToken": "9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq",
"userId": "aobEdbYhXfu5hkeqG",
"me": {
"_id": "aYjNnig8BEAWeQzMh",
"name": "Rocket Cat",
"emails": [
{
"address": "[email protected]",
"verified": false
}
],
"status": "offline",
"statusConnection": "offline",
"username": "rocket.cat",
"utcOffset": -3,
"active": true,
"roles": [
"admin"
],
"settings": {
"preferences": {}
},
"avatarUrl": "http://localhost:3000/avatar/test"
}
}
}
Version | Description |
---|---|
1.0.0 | Added avatarUrl property to response |
0.64.0 | Added me property to response |
0.63.0 | Added |
Last modified 5d ago