Discourse SSO failed to login the user while redirection


We have configured Discourse SSO with my site(.Net application). If I directly load the discourse forums site and clicking login will take us to my site login page, once user logged in, it will redirect the user to discourse forums site with logged in credentials. So here the SSO was working fine.

But now, I am loading my site and logged in. Once I clicked any discourse forums links (ex: https://forums.xyz.org/t/covid-elearning-suite-better/500/3) from my site, it’s redirecting to the discourse site without logged in. Here the SSO fails to login.

At the same time, if user clicking the link (ex: https://forums.xyz.org/session/sso?return_path=https://forums.xyz.org/t/covid-elearning-suite-better/500/3) which has “session/sso” redirected the users to discourse forums site with successfully logged in.

Below is the SSO settings pic:

Our discourse version: Discourse 2.8.0.beta9

Can’t find anything regarding that with error logs. But got some console error refer below,

Can anyone know the root cause why this issue coming ? and also can anyone help me to fix the issue ?