First case where user is registered in WP -
The user doesn’t have to click login in Discourse and they are auto-logged in
by clicking on the following link in WP -
https://community.showprowess.com/session/sso?return_path=/
If I just use the link - https://community.showprowess.com/ to go to Discourse from WP, the user is not logged in and I have to click the Login button on Discourse to login the user.
Once the user is logged in, they stay logged in until I log out from WP.
This creates a problem because if the user does not click on the /session/sso?return_path=/ , the user is not logged in. This restricts me from directing user to private message page from WP to Discourse. (a functionality I need as part of the product)
For instance, I want to send a private message to user X,
I add this link to their custom post on WP -
https://community.showprowess.com/new-message?username=x&title=Message%20from%20
As this is the first link I click, the message box does not open. Instead I am logged in to Discourse. Now I have to go back and then click on same link (message link) again to make it work.
It looks like this -
This is annoying for the users.
Earlier, this was all working just fine as the user was automatically logged in to Discourse and the URL https://community.showprowess.com would take me to a logged in Discourse page. May be the user was logged in using Browser cookies or something but that does not work anymore.
When user is not registered on Discourse
This is happening on both forms i.e. the new and old ones.
In this case, I logged back in and went through the onboarding process and this time the user was created in Discourse. Before that, user did not exist in Discourse (I checked the new user list in Admin area before logging in again).
I followed the same steps as above - click on /sessions URL to auto login in Discourse. If I click on just community domain does not login.
Unfortunately, I am not able to reproduce the case that the user is not created on registration but is created on first login. This does not happen on every single new user registration which is very strange.
I hope this helps.