For OAuth2 connection to your own site, you could use this plugin
“Login with GitHub” is built-in to discourse, and you can find setup instructions here: