# Global

##

### Methods

#### facebook(req, res) → {function}

  logs user in via facebook oauth2

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `req` | object |
  `res` | object |

  Source:
    - controller/social_controller.js, line 16

  ##### Returns:

  next() callback

  Type
    function

#### facebookcallback(req, res) → {function}

  facebook oauth callback

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `req` | object |
  `res` | object |

  Source:
    - controller/social_controller.js, line 33

  ##### Returns:

  next() callback

  Type
    function

#### instagram(req, res) → {function}

  logs user in via instagram oauth2

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `req` | object |
  `res` | object |

  Source:
    - controller/social_controller.js, line 48

  ##### Returns:

  next() callback

  Type
    function

#### instagramcallback(req, res) → {function}

  instagram oauth callback

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `req` | object |
  `res` | object |

  Source:
    - controller/social_controller.js, line 65

  ##### Returns:

  next() callback

  Type
    function

#### saveUser()

  description The save user function has two special fn calls on the model to mark the properties on it as changed/modified this gets around some werid edge cases when its being updated in memory but not save in mongo

  Source:
    - controller/token_controller.js, line 94

#### twitter(req, res) → {function}

  logs user in via twitter oauth2

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `req` | object |
  `res` | object |

  Source:
    - controller/social_controller.js, line 80

  ##### Returns:

  next() callback

  Type
    function

#### twittercallback(req, res) → {function}

  twitter oauth callback

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `req` | object |
  `res` | object |

  Source:
    - controller/social_controller.js, line 97

  ##### Returns:

  next() callback

  Type
    function

#### usePassport(req, res) → {function}

  uses passport to log users in, calls done(err,user) when complete, can define what credentials to check here

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `req` | object |
  `res` | object |

  Source:
    - controller/passport_controller.js, line 73

  ##### Returns:

  done(err,user) callback

  Type
    function