Hi Ankit,
The flow is actually reverse of what you described. When you setup Discourse Connect on your site:
- Clicking the login button will take you to
discourse_connect_url
with 2 get paramssso
andsig
. - The user will enter their credentials on the
discourse_connect_url
and will be authenticated by your site, if the auth is successful, then you need to decode the sso and follow the further steps as described in Discourse Connect topic.