I built on top of the work of others, and made github.com/consideratio/discourse-sso-oidc-bridge. So, if you have a provider that you want to use OIDC with, but also discourse SSO, then this is a solution.
( I have some trouble with using my IPhone without any interruptions now though, but it may be unrelated to the bridge. I run into a redirect loop between discourse and the discourse-sso-oidc-bridge when returning from my OIDC provider, but only on IPhones, and everything works if i reload the page of discourse. See: SSO redirect loop with Lax cookies, but only for my IPhone?! )