How should prosody authenticate with OIDC

Right now Prosody gets in its config the server on which it checks the OIDC token. I think that's not how it's supposed to happen.