Skip to content
  • A more standardised SSO implementation

    NodeBB Development
    10
    2 Votes
    10 Posts
    1k Views
    jupiter_rowland@hub.netzgemeinde.euJ
    That's good. Hubzilla already has server-side and client-side OAuth2 support, so maybe this may come in handy.
  • 0 Votes
    1 Posts
    371 Views
    K
    Hi all, still continuing on my OAuth2 plugin implementation, I've a problem I can't actually solve and need you valuable advises. I've this fragment in my plugin OAuth.getStrategy = function (strategies, callback) { winston.verbose('[maxonID] --> OAuth.getStrategy'); if (configOk) { passportOAuth = require('passport-oauth2'); passportOAuth.Strategy.prototype.userProfile = function (accessToken, done) { if (!accessToken) { done(new Error('Missing token, cannot call the userinfo endpoint without it.')); } this._oauth2.useAuthorizationHeaderforGET(true); this._oauth2.get(constants.userRoute, accessToken, function (err, body, res) { if (err) { console.error(err); return done(new Error('Failed to get user info. Exception was previously logged.')); } if (res.statusCode < 200 || res.statusCode > 299) { return done(new Error('Unexpected response from userInfo. [' + res.statusCode + '] [' + body + ']')); } OAuth.validateEntitlement(accessToken, constants.allowedEntitlement, function (err, accessAllowed) { if (err) { return done(err); } if (!accessAllowed) { // Need to find a way to gracefully notify the user and point back to login page return done(new Error('Forum access is not granted. Please contact your representative.')); } try { var json = JSON.parse(body); OAuth.parseUserReturn(json, function (err, profile) { ... and I'd like to return the user to the forum login page and notify him about the issue, something like when the password is wrong. Is there a smart way to make it happen from such a plugin without rising an error? Thanks a lot for your valuable insights, R.
  • 0 Votes
    12 Posts
    2k Views
    K
    Thanks a lot everybody for the contributions to this discussion! Your recommendations were all useful to better understanding the plugin and finally realise a prototype against 10Duke. Cheers, R
  • Is there some nodebb-plugin-sso-auth0 user ?

    NodeBB Plugins
    9
    1 Votes
    9 Posts
    3k Views
    Nethrah AyyaswamiN
    @khalid-kunji did u get this working? I am getting the same error.
  • Django SSO serveur with nodebb sso client

    NodeBB Plugins
    1
    0 Votes
    1 Posts
    1k Views
    remydevR
    Hello, I'm working on a SSO integration from a django SSO. In my django project i add 'oauth2_provider' https://django-oauth-toolkit.readthedocs.io/en/latest/ And i get this : [image: gRuoX3M.png] 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.
  • Facebook Oauth

    Solved Technical Support
    4
    0 Votes
    4 Posts
    2k Views
    julianJ
    Could be Glad to hear it is working now.
  • NodeBB - Drupal connect using OAuth

    General Discussion
    3
    0 Votes
    3 Posts
    2k Views
    A
    Is there any progress on this, as I am also interested in using Drupal with NodeBB.
  • Got error while implementing facebook login

    Solved Technical Support
    2
    0 Votes
    2 Posts
    3k Views
    Sameer YadavS
    My bad, this error was caused by extra / in config.json
  • OAuth Service Providers

    General Discussion
    1
    0 Votes
    1 Posts
    1k Views
    J
    I've been looking around off and on all day. But is anyone aware of an OAuth Service Provider? For example, for our site we are looking to implement OAuth across all of our applications for Single Sign On. We are hoping to outsource it to alleviate some of our development and free us up to work on other things. Thanks!
  • Soundcloud SSO

    NodeBB Plugins
    2
    3 Votes
    2 Posts
    2k Views
    julianJ
    Yay, another entry into the contest
  • Mo Plugins Mo Problems

    NodeBB Development
    7
    0 Votes
    7 Posts
    4k Views
    julianJ
    Aw, David Tennant! I just finished watching The Fall of Pompeii
  • nodebb-plugin-sso-linkedin

    NodeBB Plugins
    4
    1 Votes
    4 Posts
    3k Views
    phenomlabP
    @mootzville Hi. Is it possible to update this plugin to work with 1.17 ?
  • NodeBB OAuth SSO

    General Discussion
    15
    0 Votes
    15 Posts
    10k Views
    kbladeK
    @macbroadcast I am also getting the same error. Did you get a fix for that?
  • NodeBB Oauth SSO Plugin and Wordpress

    NodeBB Plugins
    23
    0 Votes
    23 Posts
    23k Views
    Mohit AgrawalM
    Try https://github.com/beingmohit/NodeBB-Wordpress-Auth