Skip to content

Discord Login - OAuth2 - NodeBB

Solved General
32 4 14.1k 1
  • wrote on last edited by
    #1

    Hi All,

    Just joined here today and must say I love the theme and the font etc. Really nice and easy to the eye.

    Anyway I was hoping that someone maybe could help out with finding a way to sign up/register on NodeBB using their Discord login?

    I did unsuccessfully try with these links below but I am totally lost haha. Not much to go by and the URL was the problem. Maybe somebody has successfully done this here and could possible give me the idiots guide 🙂

    https://github.com/jsumners/nodebb-plugin-sso-discord-alt

    https://github.com/selkkie/nodebb-plugin-sso-discord-with-logo#readme

    Thanks
    S

  • @Sampo2910 Am in. Will create a new OAUTH app under this team.

    wrote on last edited by
    #28

    @phenomlab After checking in various places (including the nginx.conf file), the reason as to why this fails is because of the trailing / in the url within config.json. Now that we’ve removed that and restarted NodeBB, Discord OAUTH works as intended.

  • Hi All,

    Just joined here today and must say I love the theme and the font etc. Really nice and easy to the eye.

    Anyway I was hoping that someone maybe could help out with finding a way to sign up/register on NodeBB using their Discord login?

    I did unsuccessfully try with these links below but I am totally lost haha. Not much to go by and the URL was the problem. Maybe somebody has successfully done this here and could possible give me the idiots guide 🙂

    https://github.com/jsumners/nodebb-plugin-sso-discord-alt

    https://github.com/selkkie/nodebb-plugin-sso-discord-with-logo#readme

    Thanks
    S

    wrote on last edited by
    #2

    @Sampo2910 Welcome to Sudonix ! Can you give me an idea of how much progress you’ve made with either plugin above ? Typically, Discord, like several other OAUTH providers tend to fail on the callback.

  • @Sampo2910 Welcome to Sudonix ! Can you give me an idea of how much progress you’ve made with either plugin above ? Typically, Discord, like several other OAUTH providers tend to fail on the callback.

    wrote on last edited by Sampo2910
    #3

    @phenomlab

    HI,

    Well i am using and got furthest with the second link from selkkie.

    Basically so far I have this. The icon does not say Discord just ‘Discover’ as you can see.
    2022-03-31 16_12_20-Login to your account _ fmjcod4-forums.png

    When i click on it I then get.
    2022-03-31 16_12_29-Authorise access to your account.png

    If i generate a URL in the Discord Developer Portal on the app then go to that URL I made I get this.
    2022-03-31 16_13_56-Authorise access to your account.png

    So I don’t think I am a million miles away but obviously doing something wrong 🙂

    But clicking on authorize then of course does this 🙂

    2022-03-31 16_33_02-_ fmjcod4-forums.png

  • @phenomlab

    HI,

    Well i am using and got furthest with the second link from selkkie.

    Basically so far I have this. The icon does not say Discord just ‘Discover’ as you can see.
    2022-03-31 16_12_20-Login to your account _ fmjcod4-forums.png

    When i click on it I then get.
    2022-03-31 16_12_29-Authorise access to your account.png

    If i generate a URL in the Discord Developer Portal on the app then go to that URL I made I get this.
    2022-03-31 16_13_56-Authorise access to your account.png

    So I don’t think I am a million miles away but obviously doing something wrong 🙂

    But clicking on authorize then of course does this 🙂

    2022-03-31 16_33_02-_ fmjcod4-forums.png

    wrote on last edited by
    #4

    @Sampo2910 Let me spin this up in my DEV environment and take a look.

  • wrote on last edited by phenomlab
    #5

    @Sampo2910 I seem to get the same error messages as you. Investigating.

    EDIT: Seems to be related to a token error from what I’m seeing in the logs.

    EDIT2: Ok, after some fiddling around with settings, I have it working 🙂 You can try it here if you want, as I’ve included it in PROD.

    1a987132-a71a-4f79-9424-ccc6db25385e-image.png

    d3d50aea-b43d-4934-9442-26cb5bbefbd0-image.png

    The part that got me initially was that I’d accidentally used the PUBLIC KEY 😕

    f75bb2db-8b35-4de0-81e7-6830f9344c75-image.png

    Be sure you’re using the CLIENT SECRET in OAUTH2.

    Seems to work without issue for me now.

    As for the Discord icon, you can get this to work by changing the CSS as below

    .fa.fa-cc-discover {
        font-family: 'Font Awesome 5 Brands' !important;
    }
    .fa-cc-discover:before {
        content: "\f392";
    }
    

    Bizarre looking “quote border” on this icon - not sure why, but will have a look

    77c2e832-49c4-48dc-a0cd-7e0ac2f70edf-image.png

  • wrote on last edited by
    #6

    great work Mark 😉

  • wrote on last edited by Sampo2910
    #7

    Great work.

    I am sure i have/had done it the same but for me it is still not working. Same error. SO something i have not done right.

    I am complete novice also so where/which css do I change?

    What did you do with Bot tokens. I assume that is needed.

    Thx

  • Great work.

    I am sure i have/had done it the same but for me it is still not working. Same error. SO something i have not done right.

    I am complete novice also so where/which css do I change?

    What did you do with Bot tokens. I assume that is needed.

    Thx

    wrote on last edited by
    #8

    Hi again 🙂

    Really not sure what I am doing wrong here. Guessing it is something simple. Still says invalid OAuth2 redirect_url as above. Hoping you guys/gals can help me 🙂

    Thx again.

  • Hi again 🙂

    Really not sure what I am doing wrong here. Guessing it is something simple. Still says invalid OAuth2 redirect_url as above. Hoping you guys/gals can help me 🙂

    Thx again.

    wrote on last edited by
    #9

    @Sampo2910 Is there any way I can get access to both your NodeBB instance, and the Discord setup ?

  • Great work.

    I am sure i have/had done it the same but for me it is still not working. Same error. SO something i have not done right.

    I am complete novice also so where/which css do I change?

    What did you do with Bot tokens. I assume that is needed.

    Thx

    wrote on last edited by
    #10

    @Sampo2910 said in Discord Login - OAuth2 - NodeBB:

    What did you do with Bot tokens. I assume that is needed.

    Here’s the settings I have

    7145dd51-b099-42b2-8fd7-c895d774a307-image.png

    407daee5-0dd2-44ed-aa57-84efc36298c5-image.png

    @Sampo2910 said in Discord Login - OAuth2 - NodeBB:

    I am complete novice also so where/which css do I change?

    You don’t need to change any CSS - you just copy the provided into ACP->Appearance->Custom CSS

  • @Sampo2910 said in Discord Login - OAuth2 - NodeBB:

    What did you do with Bot tokens. I assume that is needed.

    Here’s the settings I have

    7145dd51-b099-42b2-8fd7-c895d774a307-image.png

    407daee5-0dd2-44ed-aa57-84efc36298c5-image.png

    @Sampo2910 said in Discord Login - OAuth2 - NodeBB:

    I am complete novice also so where/which css do I change?

    You don’t need to change any CSS - you just copy the provided into ACP->Appearance->Custom CSS

    wrote on last edited by
    #11

    @phenomlab

    Hi,

    Thanks regarding the CSS that is OK now. 🙂
    I have the same settings as you have posted in all above.

    I noticed that when i hover over the ‘alternative registration’ I can see this in bottom of window before I click the link. 2022-04-04 15_04_33-Films & TV.png
    That is not the link that is in my app.
    2022-04-04 15_06_58-Discord Developer Portal — My Applications.png

    This is wrong?

    Maybe you could take a look remotely via AnyDesk ?

    Note: My forum is not ‘public’ as in it can still of course be accessed publicly but I have not ‘advertised’ it as yet. So people do not know it’s there. I will do that when I am happy with it 🙂 Just for Gamers anyway and of course for my own hobby/learning curve. I think with Discord more people will be more likely to ‘quickly’ register.

  • @phenomlab

    Hi,

    Thanks regarding the CSS that is OK now. 🙂
    I have the same settings as you have posted in all above.

    I noticed that when i hover over the ‘alternative registration’ I can see this in bottom of window before I click the link. 2022-04-04 15_04_33-Films & TV.png
    That is not the link that is in my app.
    2022-04-04 15_06_58-Discord Developer Portal — My Applications.png

    This is wrong?

    Maybe you could take a look remotely via AnyDesk ?

    Note: My forum is not ‘public’ as in it can still of course be accessed publicly but I have not ‘advertised’ it as yet. So people do not know it’s there. I will do that when I am happy with it 🙂 Just for Gamers anyway and of course for my own hobby/learning curve. I think with Discord more people will be more likely to ‘quickly’ register.

    wrote on last edited by
    #12

    @Sampo2910 said in Discord Login - OAuth2 - NodeBB:

    This is wrong?

    No, this is fact correct. The callback part is the data sent back from Discord itself to your site to complete the OAUTH handshake.

    @Sampo2910 said in Discord Login - OAuth2 - NodeBB:

    Maybe you could take a look remotely via AnyDesk ?

    I registered on your site, so if you can make me an admin (temporarily) that would be good so I can have a look around.

    I’ll also need access to your Discord setup

  • @Sampo2910 said in Discord Login - OAuth2 - NodeBB:

    This is wrong?

    No, this is fact correct. The callback part is the data sent back from Discord itself to your site to complete the OAUTH handshake.

    @Sampo2910 said in Discord Login - OAuth2 - NodeBB:

    Maybe you could take a look remotely via AnyDesk ?

    I registered on your site, so if you can make me an admin (temporarily) that would be good so I can have a look around.

    I’ll also need access to your Discord setup

    wrote on last edited by
    #13

    @phenomlab

    You should be an admin now.

    If you send me your discord tag i can invite you as a tester.

  • @phenomlab

    You should be an admin now.

    If you send me your discord tag i can invite you as a tester.

    wrote on last edited by
    #14

    @Sampo2910 phenomlab#0581

  • @Sampo2910 phenomlab#0581

    wrote on last edited by Sampo2910
    #15

    @phenomlab

    I need to add you as friend before I can invite 🙂

    UPDATE 🙂 Invited To Test App.

  • @phenomlab

    I need to add you as friend before I can invite 🙂

    UPDATE 🙂 Invited To Test App.

    wrote on last edited by
    #16

    @Sampo2910 Hmm - don’t see it in the teams section ?

  • @Sampo2910 Hmm - don’t see it in the teams section ?

    wrote on last edited by
    #17
  • wrote on last edited by
    #18

    @Sampo2910 Strange. Accepted it, but still can’t see it.

  • @Sampo2910 Strange. Accepted it, but still can’t see it.

    wrote on last edited by
    #19

    @phenomlab

    Can you try now. I had to put test mode on through main Discord application. Sorry. Forgot about that. 😞

  • @phenomlab

    Can you try now. I had to put test mode on through main Discord application. Sorry. Forgot about that. 😞

    wrote on last edited by
    #20

    @Sampo2910 Still nothing.


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee ☕
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • TNG + Nodebb

    General tng genealogy nodebb plugin
    4
    0 Votes
    4 Posts
    2k Views
    phenomlab
    @Madchatthew said in TNG + Nodebb: you have to try and use duck tape and super glue to change something to make it do what you want it to do I couldn’t have put that better myself.
  • Modify the tagging behavior in NodeBB

    Locked General tagging harmony
    11
    3 Votes
    11 Posts
    4k Views
    phenomlab
    For anyone else following this thread https://community.nodebb.org/topic/17402/change-in-reply-to-xxxx-text And https://github.com/NodeBB/NodeBB/commit/f2152953cddd3247746ef393516b0a53ba7750a4
  • Welcome to NodeBB V3!

    Pinned Moved General v3-prod code changes
    1
    0 Votes
    1 Posts
    862 Views
    No one has replied
  • 0 Votes
    5 Posts
    2k Views
    phenomlab
    @qwinter this particular site uses the code I wrote if you want to see it in action. It’s a information and intelligence gatherer I designed for collecting various information security articles from around the globe and consolidating them in one place. Essentially, each “post” is in fact generated by the script, and the NodeBB API. https://hostrisk.com/
  • Discourse can turn posts into wiki posts. Can nodeBB?

    General wiki
    4
    2 Votes
    4 Posts
    2k Views
    phenomlab
    @qwinter it’s workable I think, but not perfect - then again, unless you write a specific plugin to perform such a task, what is. As you pointed out, you have versioning of sorts with the historical access to reach post.
  • NodeBB vs Flarum for a non developer

    Solved General
    17
    10 Votes
    17 Posts
    6k Views
    phenomlab
    @marusaky That’s really easily done. I think the docs need updating for the latest release. Did you land up on the 18.x train ?
  • NodeBB Blog Comments

    General nodebb blog
    3
    1 Votes
    3 Posts
    2k Views
    phenomlab
    @kurulumu-net Not specifically, but you should review this post from the very large thread as it will save you a lot of time. There’s significant customisation on the Ghost side of things, but not in NodeBB https://community.nodebb.org/post/86022
  • Nodebb Hashtag plugin

    Solved General
    15
    1 Votes
    15 Posts
    6k Views
    phenomlab
    @jac Great ! I’ll close this off.