How is it possible to connect Discourse with two OIDC providers?

I managed to connect GitLab and Microsoft (Azure) with this plugin. btw: for the Azure AD service, make sure to use the “Application Client ID” as client id, not the secret ID or value).

How is it possible to connect Discourse with two OIDC providers, e.g. GitLab and Azure?

EDIT: I managed to get GitLab Login working with OAuth2, so my question is now more “theoretical”.

I think that you would need to fork the plugin and change its name to be able to configure it twice. Maybe you’d fork it and hard code it for one of those services.