Discourse SSO with OAuth2

I’m still confused.

In case it wasn’t clear, I have

Website with Github OAuth.
Discourse with Github OAuth.

Neither of them have any other login methods.
When a user logs in to my website, they should be logged into discourse as well.

What I’m missing is the link between them. How do I log them into discourse when they authenticate via Github OAuth on my website?