A similar approach is to develop a small web service that acts as a SSO endpoint for Discourse, and handles authentication as you explained. I’d prefer SSO if your are certain that only users of your app should use Discourse, and prefer oauth2 if you also want to support different ways to log in (e.g. for potential customers).