• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

NodeBB SSO Plug-in Flow

Scheduled Pinned Locked Moved General Discussion
2 Posts 1 Posters 1.2k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • danielflippanceD Offline
    danielflippanceD Offline
    danielflippance
    wrote on last edited by
    #1

    I'm using the following sample SSO plug-in as an OAuth2 client for an OAuth2orize server and have some questions about how it works:

    GitHub - julianlam/nodebb-plugin-sso-oauth: NodeBB Plugin that allows users to login/register via any configured OAuth provider.

    NodeBB Plugin that allows users to login/register via any configured OAuth provider. - GitHub - julianlam/nodebb-plugin-sso-oauth: NodeBB Plugin that allows users to login/register via any configured OAuth provider.

    favicon

    GitHub (github.com)

    I've forked the above code from GitHub and modified the library.js file with my URLs and parameters as suggested in the code comments.

    My expectation was that the process would flow like this:

    1. Client calls server to authenticate
    2. Server authenticates, asks about granting access to resources and redirects back to client with an authentication code.
    3. Client then calls the server to exchange the authentication code for an access token
    4. Server responds with an access token
    5. Client then calls the server to get user info, passing the access token
    6. Server responds with user info JSON

    Looking at my logs, I see that step 3 doesn't happen, but instead the flow goes straight to step 5. The problem I have is that step 5 requires an access token which it doesn't have, so the auth fails.

    Am I not understanding something about the way this works or do I need to make some more code changes to the sample sso plugin?

    1 Reply Last reply
    0
  • danielflippanceD Offline
    danielflippanceD Offline
    danielflippance
    wrote on last edited by
    #2

    Found the problem: Step 3 requires that the server accept HTTP POST - I was only accepting GET.

    1 Reply Last reply
    1

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development