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.
- package/library.js +4 -7
- 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
|
-
|
|
208
|
+
const hostHelpers = require.main.require('./src/routes/helpers');
|
|
209
209
|
|
|
210
|
-
function
|
|
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',
|
|
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
|
});
|