Suggested Topics

Hello,
I'm working on a SSO integration from a django SSO.
In my django project i add 'oauth2_provider'
Welcome to Django OAuth Toolkit Documentation — Django OAuth Toolkit 1.3.2 documentation
And i get this :
On the nodebb side, I started from the plugin
https://github.com/julianlam/nodebb-plugin-sso-oauth
Which 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.

For anyone else that may find this post and is struggling, this step by step walkthrough really helped me out (at least regarding the php oauth2 server) http://bshaffer.github.io/oauth2-server-php-docs/cookbook/

I love this plugin, but I noticed one deadly problem. Misplaced characters can break the forum. The plugin looks for markdown header codes like
Imgur
and creates a toc...however if the codes are wrong
Imgur
the first line here has a period infront of the #
the toc function will break.
It seems the creator is gone so I hope someone else will fix this bug.