From c2e0bc9f7f476dd80bfea928a5500636214b3e37 Mon Sep 17 00:00:00 2001 From: JeraldJF Date: Tue, 23 Dec 2025 14:45:11 +0530 Subject: [PATCH 1/5] #0000: fix: changes --- package.json | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index b270304..82a77ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodebb-plugin-sunbird-oidc", - "version": "1.0.17", + "version": "2.0.0", "description": "Authenticate to Sunbird identity provider.", "main": "library.js", "repository": { @@ -21,17 +21,16 @@ "license": "BSD-2-Clause", "readmeFilename": "README.md", "dependencies": { - "async": "^2", + "async": "^3.2.0", + "axios": "^1.7.0", "fs": "0.0.1-security", "lodash": "^4.17.20", - "mongoose": "^5.11.9", + "mongoose": "^8.0.0", "passport-custom": "^1.1.1", - "request": "2.81.0", - "request-promise": "^4.2.6", "uid2": "0.0.x" }, "nbbpm": { - "compatibility": "^1.0.1" + "compatibility": "^4.0.0" }, "devDependencies": { "@commitlint/cli": "^8.3.5", @@ -56,4 +55,4 @@ ] }, "scripts": {} -} +} \ No newline at end of file From 0de75751e5d9ff24231a33f937ff6f1c2eb736fc Mon Sep 17 00:00:00 2001 From: JeraldJF Date: Tue, 30 Dec 2025 12:29:01 +0530 Subject: [PATCH 2/5] #0000 changes --- package.json | 2 +- plugin.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 82a77ed..f67ef3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodebb-plugin-sunbird-oidc", - "version": "2.0.0", + "version": "2.0.1", "description": "Authenticate to Sunbird identity provider.", "main": "library.js", "repository": { diff --git a/plugin.json b/plugin.json index 6d97d45..1a9b547 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "id": "nodebb-plugin-sunbird-oidc", "name": "Sunbird SSO Plugin for NodeBB", "description": "Authenticate to Sunbird identity provider.", - "url": "https://github.com/vrayulu/nodebb-plugin-sunbird-oidc", + "url": "https://github.com/JeraldJF/nodebb-plugin-sunbird-oidc", "library": "./library.js", "templates": "templates", "hooks": [ From 7ffa7421bb4317d7841855a66d3dd93a0c29f06c Mon Sep 17 00:00:00 2001 From: JeraldJF Date: Fri, 2 Jan 2026 16:11:41 +0530 Subject: [PATCH 3/5] #0000: fix: changes --- package.json | 2 +- plugin.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index f67ef3e..0a1a968 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodebb-plugin-sunbird-oidc", - "version": "2.0.1", + "version": "2.0.4", "description": "Authenticate to Sunbird identity provider.", "main": "library.js", "repository": { diff --git a/plugin.json b/plugin.json index 1a9b547..939a1f0 100644 --- a/plugin.json +++ b/plugin.json @@ -3,7 +3,6 @@ "name": "Sunbird SSO Plugin for NodeBB", "description": "Authenticate to Sunbird identity provider.", "url": "https://github.com/JeraldJF/nodebb-plugin-sunbird-oidc", - "library": "./library.js", "templates": "templates", "hooks": [ { From 647bc076b27420717cca076c693409958d9b62cd Mon Sep 17 00:00:00 2001 From: JeraldJF Date: Tue, 6 Jan 2026 12:26:33 +0530 Subject: [PATCH 4/5] #SB-I403: fix: version upgrades --- package.json | 2 +- plugin.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0a1a968..ea05b7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodebb-plugin-sunbird-oidc", - "version": "2.0.4", + "version": "8.2.0", "description": "Authenticate to Sunbird identity provider.", "main": "library.js", "repository": { diff --git a/plugin.json b/plugin.json index 939a1f0..9f49c82 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "id": "nodebb-plugin-sunbird-oidc", "name": "Sunbird SSO Plugin for NodeBB", "description": "Authenticate to Sunbird identity provider.", - "url": "https://github.com/JeraldJF/nodebb-plugin-sunbird-oidc", + "url": "https://github.com/Sunbird-Lern/nodebb-plugin-sunbird-oidc", "templates": "templates", "hooks": [ { From 2ff3705f4f4591bada0fd29ba034eb00e0c7e11e Mon Sep 17 00:00:00 2001 From: JeraldJF Date: Fri, 9 Jan 2026 17:02:18 +0530 Subject: [PATCH 5/5] #SB-I403: fix: changes done for removing deprecated packages --- library.js | 43 +++++++++++++++++++++---------------------- package.json | 13 ++++++------- 2 files changed, 27 insertions(+), 29 deletions(-) diff --git a/library.js b/library.js index 46c38d8..50bcf5a 100644 --- a/library.js +++ b/library.js @@ -11,7 +11,7 @@ const url = require('url'); const uid = require('uid2'); const async = require('async'); - const request = require('request-promise'); + const axios = require('axios'); const CustomStrategy = require('passport-custom'); const passport = module.parent.require('passport'); @@ -208,39 +208,38 @@ Oidc.getAccessTokenFromCode = async function (settings, code) { - const options = { - method: 'POST', - url: settings.tokenEndpoint, - form: { - grant_type: 'authorization_code', - client_id: settings.clientId, - client_secret: settings.clientSecret, - code: code, - redirect_uri: settings.callbackURL + const formData = new URLSearchParams({ + grant_type: 'authorization_code', + client_id: settings.clientId, + client_secret: settings.clientSecret, + code: code, + redirect_uri: settings.callbackURL + }); + + const response = await axios.post(settings.tokenEndpoint, formData, { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' } - } - return request(options); + }); + + return JSON.stringify(response.data); }; Oidc.getAccessTokenFromId = async function (settings, id) { const tokenUrl = new URL(settings.ssoTokenEndpoint); tokenUrl.searchParams.append("id", id); - const options = { - method: 'GET', - url: tokenUrl.href - } - return request(options); + + const response = await axios.get(tokenUrl.href); + return JSON.stringify(response.data); }; Oidc.getUserInfo = async function (settings, accessToken) { - const options = { - method: 'GET', - url: settings.userInfoEndpoint, + const response = await axios.get(settings.userInfoEndpoint, { headers: { 'Authorization': 'Bearer ' + accessToken } - } - return request(options); + }); + return JSON.stringify(response.data); }; /** diff --git a/package.json b/package.json index ea05b7b..f764f55 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "dependencies": { "async": "^3.2.0", "axios": "^1.7.0", - "fs": "0.0.1-security", "lodash": "^4.17.20", "mongoose": "^8.0.0", "passport-custom": "^1.1.1", @@ -33,17 +32,17 @@ "compatibility": "^4.0.0" }, "devDependencies": { - "@commitlint/cli": "^8.3.5", - "@commitlint/config-angular": "^8.3.4", + "@commitlint/cli": "^18.0.0", + "@commitlint/config-angular": "^18.0.0", "@types/async": "^3.0.8", "@types/express": "^4.17.3", "@types/passport-oauth2": "^1.4.8", - "eslint": "^6.8.0", + "eslint": "^8.57.0", "eslint-config-airbnb-base": "^14.1.0", "eslint-plugin-import": "^2.20.1", - "husky": "^4.2.3", - "lint-staged": "^10.0.8", - "typescript": "^3.8.3" + "husky": "^8.0.3", + "lint-staged": "^15.0.0", + "typescript": "^5.3.0" }, "husky": { "hooks": {}