mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
feat: facebook login (#820)
* Facebook strategy * Update user_auth_system.md * Update user_auth_system.md
This commit is contained in:
parent
a569020312
commit
007d51ede1
23 changed files with 155 additions and 27 deletions
|
|
@ -38,7 +38,8 @@ router.get(
|
|||
router.get(
|
||||
'/facebook',
|
||||
passport.authenticate('facebook', {
|
||||
scope: ['public_profile', 'email'],
|
||||
scope: ['public_profile'],
|
||||
profileFields: ['id', 'email', 'name'],
|
||||
session: false,
|
||||
}),
|
||||
);
|
||||
|
|
@ -49,7 +50,8 @@ router.get(
|
|||
failureRedirect: `${domains.client}/login`,
|
||||
failureMessage: true,
|
||||
session: false,
|
||||
scope: ['public_profile', 'email'],
|
||||
scope: ['public_profile'],
|
||||
profileFields: ['id', 'email', 'name'],
|
||||
}),
|
||||
(req, res) => {
|
||||
const token = req.user.generateToken();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue