mirror of
https://github.com/wassname/talk.git
synced 2026-08-17 11:27:52 +08:00
Merge master
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
---
|
||||
title: talk-plugin-facebook-auth
|
||||
permalink: /plugin/talk-plugin-facebook-auth/
|
||||
layout: plugin
|
||||
plugin:
|
||||
name: talk-plugin-facebook-auth
|
||||
depends:
|
||||
- name: talk-plugin-auth
|
||||
provides:
|
||||
- Server
|
||||
- Client
|
||||
---
|
||||
|
||||
Enables sign-in via Facebook via the server side passport middleware.
|
||||
|
||||
Configuration:
|
||||
|
||||
- `TALK_FACEBOOK_APP_ID` (**required**) - The Facebook App ID for your Facebook
|
||||
Login enabled app. You can learn more about getting a Facebook App ID at the
|
||||
[Facebook Developers Portal](https://developers.facebook.com) or by visiting
|
||||
the [Creating an App ID](https://developers.facebook.com/docs/apps/register)
|
||||
guide. This is only required while the `talk-plugin-facebook-auth` plugin is
|
||||
enabled.
|
||||
- `TALK_FACEBOOK_APP_SECRET` (**required**) - The Facebook App Secret for your
|
||||
Facebook Login enabled app. You can learn more about getting a Facebook App
|
||||
Secret at the [Facebook Developers Portal](https://developers.facebook.com)
|
||||
or by visiting the
|
||||
[Creating an App ID](https://developers.facebook.com/docs/apps/register)
|
||||
guide. This is only required while the `talk-plugin-facebook-auth` plugin is
|
||||
enabled.
|
||||
@@ -1,3 +1,7 @@
|
||||
ar:
|
||||
talk-plugin-facebook-auth:
|
||||
sign_in: "تسجيل الدخول عبر حساب الفيسبوك"
|
||||
sign_up: "اشترك عبر حساب الفيسبوك"
|
||||
en:
|
||||
talk-plugin-facebook-auth:
|
||||
sign_in: "Sign in with Facebook"
|
||||
|
||||
@@ -25,7 +25,14 @@ module.exports = passport => {
|
||||
async (req, accessToken, refreshToken, profile, done) => {
|
||||
let user;
|
||||
try {
|
||||
user = await UsersService.findOrCreateExternalUser(profile);
|
||||
const { id, provider, displayName } = profile;
|
||||
|
||||
user = await UsersService.findOrCreateExternalUser(
|
||||
req.context,
|
||||
id,
|
||||
provider,
|
||||
displayName
|
||||
);
|
||||
} catch (err) {
|
||||
return done(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user