As Jay noted, the best way to accomplish this is to configure your WordPress site to be the SSO provider for Discourse. Have a look at this topic for details about how to set it up: Configure single sign-on (SSO) with WP Discourse and DiscourseConnect.
After configuring WordPress as the DiscourseConnect provider, Discourse users who do not yet have accounts on your WordPress site will need to signup on WordPress before they can access your Discourse site. You should add a message to your Discourse site to tell users about the change. In the message, encourage users to signup on WordPress with the same email address as they are using on Discourse. That way they will be logged into their existing Discourse account the first time they log back into Discourse via WordPress.
If users do not register on WordPress with the email address they are using on Discourse, a new account will be created for them the first time they log back into Discourse via WordPress. You can resolve this issue on a case by case basis by merging the old Discourse account into the new Discourse account. This can be done from the user’s Discourse admin page.
One thing to note is that the behaviour of users being logged into their existing Discourse account will only work if email addresses are being marked as “valid” on the WordPress end. If you are using the default WordPress registration system, this will work without any issues. If you are using a custom registration page that has been added by a plugin, it is likely that users email addresses will not be marked as “valid.” Details about how to resolve this issue are here: Configure single sign-on (SSO) with WP Discourse and DiscourseConnect. Note that it is very important that you don’t just blindly accept email addresses without validating them in some way. If email addresses are not validated, you risk having existing accounts taken over.