@julian Thank you for the quick response!
Use my oauth instead of NodeBB plugins
I have oauth working for github and google on my site using passport.js library.
What are the steps to get the nodebb forums to use that auth so my users don't have to log into my site and the nodebb site. I have seen a github ticket on this but I still don't understand how this can be done. Any help would be greatly appreciated.
Great work with NodeBB guys
Currently the user logs into my app with github or google. I enabled the google-ss and github-sso plugins and configured them the same way in nodeBB/admin. Is there a special way i need to persist the access_tokens or something to have the sign on work for nodeBB?
When I log in with github in nodebb, I don't see where anything gets stored. Where does it save the logged in state?
I think what you are looking for is nodebb-plugin-session-sharing, it allows nodebb to read the session cookie from your site instead of using nodebb login or sso plugins.
I still don't understand how to use that though. Can we expand on the docs there? Its pretty unclear to me how to proceed.
@Jonathan-O'Donnell If that example doesn't make sense to you, you should consider hiring the NodeBB team to do what you need done.
@Jonathan-O-Donnell unless I'm misunderstanding, your site currently has GitHub and Google SSO enabled?
In that case, if you want the same for NodeBB, you will need to install those SSO plugins in NodeBB as well.
If you don't want to use SSO, then @yariplus' suggestion of session sharing is the way to go.
Here are the steps I have done.
On my site:
Using passport Js to have the user log in with google or github when they click the login on my site.
I have enabled the google-sso plugin and github plugin in the admin portal.
Then I set the client secret and client ID to the same one as my site. (Could not change the github callback url as the field is disabled)
Is this supposed to work automagically or am I missing some crucial step.
I log into google and github successfully and get the accessToken and refresh token (which I store in cookies) But when I go to the node bb categories pages and try to post, I see the "Login to post" button.
Thank you Julian for the help so far. You are a hero of the open source community.
@Jonathan-O'Donnell said in Use my oauth instead of NodeBB plugins:
Is this supposed to work automagically
don't think so. I believe you will have to login to NodeBB using SSO.
ah yes. working on this now nodebb-plugin-session-sharing,
this is what I was looking for. Will post a full guide once I get this running on my server
No need to post a full guide as @yariplus had the correct answer all the time. I just did not understand it at first.