• 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

SSO Authentication - Https - NGINX configuration

Scheduled Pinned Locked Moved Technical Support
2 Posts 1 Posters 272 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.
  • H.urnaH Offline
    H.urnaH Offline
    H.urna
    wrote on last edited by H.urna
    #1

    Hi folks,

    I am currently struggling on using sso plugins with my nodebb instance (online).
    I have done quite some researches here and from the web, but did not get any answer.
    Still, I saw several topics about the subject.
    Thanks for having a look, and hope it could help others too.

    I handle SSL using a nginx reverse-proxy behind all my nodes applications and here are the errors found :
    SSO-Google
    Oops! Looks like something went wrong!
    /auth/google/callback
    Bad Request

    SSO-GIT
    Oops! Looks like something went wrong!
    /auth/github/callback
    The redirect_uri MUST match the registered callback URL for this application.

    ... and same kind of error for FB.

    Concerning the App configuration it seems well configured with an Https callback URL:
    https://-.-.io/auth/github/callback
    https://-.-.io as homepage.

    My NGINX configuration try to pass all needed information within the header :
    "
    proxy_pass http://localhost:8080;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header X-Forwarded-Port 443;
    "

    And finally the traces I think the problem comes from, the (it's not the case for this nodeBB forum)

    Github 302 (OK) :
    (mine)
    GET /auth/github HTTP/1.1
    Host: community.-.io

    (nodebb)
    GET /auth/github HTTP/1.1
    Host: community.nodebb.org

    Authorize (PROBLEM) :
    (mine)
    GET /login/oauth/authorize?response_type=code&redirect_uri=http%3A%2F%2Fcommunity.-.io%2Fauth%2Fgithub%2Fcallback&s...
    HTTP/1.1
    Host: github.com

    (nodeBB)
    GET /login/oauth/authorize?response_type=code&redirect_uri=https%3A%2F%2Fcommunity.nodebb.org%2Fauth%2Fgithub%2Fcallback&... HTTP/1.1
    Host: github.com

    Why am I loosing the S from the protocol ?!

    Thank you for your help.
    Kind regards.
    Hybesis

    1 Reply Last reply
    0
  • H.urnaH Offline
    H.urnaH Offline
    H.urna
    wrote on last edited by
    #2

    Finally found a topic with good explanation an answers:

    Redirect Notice

    favicon

    (www.google.com)

    Didn't expect the config.json would influence such requests.

    Kind regards.

    1 Reply Last reply
    0

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