Authenticate with Google.
URL | Requires Auth | HTTP Method |
|
|
|
Argument | Example | Required | Description |
|
| Required | The desired OAuth service name |
|
| Required | Access token provided by google oauth |
|
| Required | Id token provided by google auth |
|
| Required | Lifetime of token(in seconds) |
|
| Optional | Google scopes for API |
curl -H "Content-type:application/json" \http://localhost:3000/api/v1/login \-d '{ "serviceName": "google", "accessToken": "hash","idToken": "hash", "expiresIn": 200, "scope": "profile" }'
{"status": "success","data": {"authToken": "9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq","userId": "aobEdbYhXfu5hkeqG","me": {"_id": "aYjNnig8BEAWeQzMh","name": "Rocket Cat","emails": [{"address": "rocket.cat@rocket.chat","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 |
0.64.0 | Added |
0.60.0 | Added |