How to detect Discourse user on Ghost Blog?

Yes. And this feature has to be VERY CAREFULLY implemented for some evident security reason.

Basically, what you are asking is to make every Discourse site a potential OAuth2 provider. That means that you need an agreement with every Discourse instance owner you want to use as id source, with authentication keys and everything else.

You have to understand that the user database is a very, very, VERY sensitive matter. If my site is used by a political party, for instance, we are not interested that someone scans our user database and collect highly confidential information (who supports us politically).