Provides functions to log in clients.
- Source:
Methods
(static) loginWithFacebook(req, res)
Logs in the user over Facebook. Clients should send a Facebook short living token in
the request payload as JSON. ie. {"fb_access_token":"XYZ"}
Returns a custom token. Clients should store that and send it along in future requests.
If user exists already, logs in the user. If user doesn't exist, creates a user.
In both cases, a Facebook long living token is requested from Facebook and stored. Likewise, user profile is requested and saved.
Parameters:
Name | Type | Description |
---|---|---|
req |
||
res |
- Source: