Facebook and Twitter SSO

NodeBB Plugins

Suggested Topics


  • 0 Votes
    2 Posts
    2k Views

    Ok, so far I've got it to work using passport-facebook-token and changing julian's sso-facebook plugin:

    FacebookTokenStrategy = require('passport-facebook-token'),

    and changing:

    passport.use(new passportFacebook({

    to

    passport.use(new FacebookTokenStrategy({

    Also:

    strategies.push({ name: 'facebook', url: '/auth/facebook', callbackURL: '/auth/facebook/callback', icon: constants.admin.icon, scope: 'email, user_friends' });

    to

    strategies.push({ name: 'facebook-token', url: '/auth/token', callbackURL: '/auth/token/callback', icon: constants.admin.icon, scope: 'email, user_friends' });

    I'm able to log into my account but I get this error:

    0_1499144571635_Screen Shot 2017-07-04 at 00.02.37.png

    Why is the route not found?

  • 0 Votes
    4 Posts
    1k Views

    Nice with old threads popping up 😉

  • 1 Votes
    23 Posts
    12k Views

    @Oroton said:

    @Codejet said:

    @Mega , have uploaded this pic, simply these are 3 dif screenshots in the one pic.

    First is initial reload pushes all adjacent horizontal categories downwards leaving gap in masonary, middle is after 2 reloads (perfect, what we want), last one is after navigating and coming back to the front page.

    masonaryfbembedplugin.png

    I have a solution to cause a page reload whenever condition is met in

    $(document).on('ready', function() {}

    if condition matches front page url. But obviously you would not advise this

    EDIT: scratch that can't even get that to work since a root url link just doesn't exist. lol I'll keep trying

    Have you got this facebook plugin working?

    Working correctly in 0.7.0-dev. Both in the Masonry and Widgets.

  • Twitter embed plugin

    NodeBB Plugins
    0 Votes
    1 Posts
    766 Views

    I just started playing with this because I noticed it wasn't working... had a look at the code and @ the twitter url that the embed plugin uses.

    Noticed that there are 2 different url links with the words 'status' and 'statuses'.

    On seeing this I decided to change the word in the main regexp for this program.

    For some unexpected reason, after having so many problems trying to get this working again, changing the regexp and reloading NodeBB seemed to get the plugin displaying twitter embed's again. Can the plugin developer look at why this is working sometimes and not other times.

    After mucking around with it I decided to change this line to:

    var regularUrl = /<a href="(http|https):\/\/twitter.com\/([^\/"\s]*)\/statuse?s?\/([^\/"\s]*)(\/photo\/1|)">.+?<\/a>/g

    note the ' statuse?s? ' (this matches either statuses or status in the url link)

    I know this probably worked correct before but for some strange reason altering this regexp seemed to kick start the plugin again and now it works.