nodebb-plugin-sso-github 3.0.3 → 3.0.4

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.
Files changed (2) hide show
  1. package/library.js +4 -7
  2. package/package.json +1 -1
package/library.js CHANGED
@@ -205,18 +205,15 @@
205
205
  };
206
206
 
207
207
  GitHub.init = function(data, callback) {
208
- var hostHelpers = require.main.require('./src/routes/helpers');
208
+ const hostHelpers = require.main.require('./src/routes/helpers');
209
209
 
210
- function renderAdmin(req, res) {
210
+ hostHelpers.setupAdminPageRoute(data.router, '/admin/plugins/sso-github', function (req, res) {
211
211
  res.render('admin/plugins/sso-github', {
212
212
  callbackURL: nconf.get('url') + '/auth/github/callback'
213
213
  });
214
- }
215
-
216
- data.router.get('/admin/plugins/sso-github', data.middleware.admin.buildHeader, renderAdmin);
217
- data.router.get('/api/admin/plugins/sso-github', renderAdmin);
214
+ });
218
215
 
219
- hostHelpers.setupPageRoute(data.router, '/deauth/github', data.middleware, [data.middleware.requireUser], function (req, res) {
216
+ hostHelpers.setupPageRoute(data.router, '/deauth/github', [data.middleware.requireUser], function (req, res) {
220
217
  res.render('plugins/sso-github/deauth', {
221
218
  service: "GitHub",
222
219
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-sso-github",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "NodeBB GitHub SSO",
5
5
  "main": "library.js",
6
6
  "repository": {