Django SSO serveur with nodebb sso client
-
Hello,
I'm working on a SSO integration from a django SSO.
In my django project i add 'oauth2_provider'And i get this :
On the nodebb side, I started from the plugin
https://github.com/julianlam/nodebb-plugin-sso-oauthWhich I modified as a result:
The config.json file
"oauth": { "id": "rs2yEx7aqrj7ZIgVRC9IFL7p0DyIjQwWPST4BqVW", "secret": "6A678EDFqAYtl0sALS5rqk2mfhlBQi0HIgoGH5mPaeIpnZGni8BdOFiv" },
and in the library.js) i change this lignes
var constants = Object.freeze({ type: 'oauth2', // Either 'oauth' or 'oauth2' name: 'nodebb_django', // Something unique to your OAuth provider in lowercase, like "github", or "nodebb" oauth: { requestTokenURL: '', accessTokenURL: '', userAuthorizationURL: '', consumerKey: nconf.get('oauth:key'), // don't change this line consumerSecret: nconf.get('oauth:secret'), // don't change this line }, oauth2: { authorizationURL: 'https://beta.esprit-bourse.com/oauth/authorize', tokenURL: 'https://beta.esprit-bourse.com/oauth/token', clientID: nconf.get('oauth:id'), // don't change this line clientSecret: nconf.get('oauth:secret'), // don't change this line }, userRoute: '' // This is the address to your app's "user profile" API endpoint (expects JSON) }),
I've never programmed in JS nodes, so I don't really know what to do, and I don't understand all the code.
I may have to change the information as indicated. Update profile information (around line 137 of library. js). But there is no user account to use the Oauth system
After a git clone, i can't enable the plugin so i think there is something else to change.
if someone can help me I will document everything for the link Oauth django/nodeBB. Otherwise, I'll keep the site and forum separate.