nodebb-plugin-sso-facebook 4.2.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library.js +10 -10
- package/package.json +4 -4
- package/templates/plugins/sso-facebook/deauth.tpl +3 -3
package/library.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
const passport =
|
|
4
|
+
const passport = nodebb.require('passport');
|
|
5
5
|
const passportFacebook = require('passport-facebook').Strategy;
|
|
6
|
-
const nconf =
|
|
7
|
-
const winston =
|
|
6
|
+
const nconf = nodebb.require('nconf');
|
|
7
|
+
const winston = nodebb.require('winston');
|
|
8
8
|
|
|
9
|
-
const user =
|
|
10
|
-
const meta =
|
|
11
|
-
const db =
|
|
9
|
+
const user = nodebb.require('./src/user');
|
|
10
|
+
const meta = nodebb.require('./src/meta');
|
|
11
|
+
const db = nodebb.require('./src/database');
|
|
12
12
|
|
|
13
13
|
const constants = Object.freeze({
|
|
14
14
|
'name': 'Facebook',
|
|
@@ -23,7 +23,7 @@ const Facebook = {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
Facebook.init = async function (params) {
|
|
26
|
-
const hostHelpers =
|
|
26
|
+
const hostHelpers = nodebb.require('./src/routes/helpers');
|
|
27
27
|
|
|
28
28
|
hostHelpers.setupAdminPageRoute(params.router, '/admin/plugins/sso-facebook', function (req, res) {
|
|
29
29
|
res.render('admin/plugins/sso-facebook', {
|
|
@@ -295,9 +295,9 @@ Facebook.getUidByFbid = async function (fbid) {
|
|
|
295
295
|
|
|
296
296
|
Facebook.addMenuItem = function (custom_header) {
|
|
297
297
|
custom_header.authentication.push({
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
298
|
+
route: constants.admin.route,
|
|
299
|
+
icon: constants.admin.icon,
|
|
300
|
+
name: constants.name,
|
|
301
301
|
});
|
|
302
302
|
return custom_header;
|
|
303
303
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodebb-plugin-sso-facebook",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "NodeBB Facebook SSO",
|
|
5
5
|
"main": "library.js",
|
|
6
6
|
"repository": {
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"passport-facebook": "~1.0.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"eslint": "10.0
|
|
36
|
-
"eslint-config-nodebb": "^2.0.
|
|
35
|
+
"eslint": "10.7.0",
|
|
36
|
+
"eslint-config-nodebb": "^2.0.3"
|
|
37
37
|
},
|
|
38
38
|
"nbbpm": {
|
|
39
|
-
"compatibility": "^4.
|
|
39
|
+
"compatibility": "^4.14.0"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<div class="col-12 col-sm-8 col-offset-sm-2 col-md-6 col-offset-md-3">
|
|
2
2
|
<div class="card">
|
|
3
3
|
<div class="card-header">
|
|
4
|
-
<span class="fs-4">
|
|
4
|
+
<span class="fs-4">{{tx("user:sso.dissociate-confirm-title")}}</span>
|
|
5
5
|
</div>
|
|
6
6
|
<div class="card-body">
|
|
7
|
-
|
|
7
|
+
{{tx("user:sso.dissociate-confirm", service)}}
|
|
8
8
|
|
|
9
9
|
<hr>
|
|
10
10
|
|
|
11
11
|
<form method="post">
|
|
12
12
|
<input type="hidden" name="_csrf" value="{config.csrf_token}" />
|
|
13
|
-
<button class="btn btn-danger">
|
|
13
|
+
<button class="btn btn-danger">{{tx("user:sso.dissociate")}}</button>
|
|
14
14
|
</form>
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|