Hi Ronny,
The way I've done this sort of thing in the past is to use the OpenID Connect Code Flow protocol and make the OpenID server the sole identity authority, so the Joomla auth plugin is disabled and the only way to log in is via the OpenID server. There are probably other ways to do it, but that was relatively straightforward to implement and it provided Single-Sign On (SSO) if multiple Joomla (or a mix with non-Joomla) websites were involved.
The protocol specification is here:
https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuthThe basic steps are as follows:
1. When the user visits a page on the website that requires them to be logged in (or they click the "Log in" link), the plugin detects this and redirects them to the OpenID server with a specially-crafted URL.
2. The user "logs in" to the OpenID server using whatever means required (password, MFA, etc.), after which the OpenID server will redirect the user back to the website with a URL that includes a short-lived token.
3. The Joomla plugin detects that the URL is a returning user and then does a background POST request to the OpenID server using the token supplied in the previous step. The response verifies to the plugin that the user has indeed authenticated themselves. The user can now be safely logged in to the website (without user dialogue). If the user is not known to Joomla then a new user record can also be created using whatever information the OpenID server provided (which could be just an email address, but that's often all that's needed).
The devil is the detail, of course. I found the trickiest part was correctly unpacking and decrypting the response to the POST request.
Hope that helps.
Chris.