Zulip uses python-social-auth for some other backends, so for the more general version of your question about doing some other third-party auth, the answer is not super hard. That said, it looks like python-social-auth doesn't have a backend for Discourse: https://python-social-auth.readthedocs.io/en/latest/backends....
It's also probably not super hard to just add a direct authentication backend for Discourse.
Thanks for information. Seems like I should be able to do it.
Though if we want to have little customization like that does it mean we'll absolutely need to host it on our servers or something like that possible on hosted plan?
PS: Obviously I get that If I manage to push code upstream hosted option will support it, but I suppose it's might take a while.
Once something is merged to master in zulip.git, it's usually on zulipchat.com production within a few days.
So if you do it in a way that gets merged (which requires, e.g., automated tests appropriate for an authentication backend) and is configurable for just one organization in a multi-organization server, you would not need to host your own servers.
It's also probably not super hard to just add a direct authentication backend for Discourse.