We are looking to build a community using discourse APIs. We are facing an issue the flow.
Our Front end is a react app and the BE is based on NodeJS with a MS architecture. We manage all the authentication flow on our end.
From my understanding of Discourse Connect is,
-
FE creates the payload, with a nonce, user Information and then makes a call to example.com/session/SSO ?sso=xx&sig=xx
-
DIscourse then makes a call back to the discourse_connect_url, wherein I will validate the payload and then return the redirect url and users will be redirected to the discourse.
However, when I create the payload with user information, I am not able to propagate it from my Front End to Discourse and then to Backend. Can somebody help me out or is my understanding correct? I searched the forum too with expected solutions but to no avail.
Note that when I hardcore user information from BE, I am able to login users to discourse.
I want our website to be the authentication providers for the discourse, and propagate user information from Front End to BE. Can somebody help me with the flow or maybe some examples for the Javascript?