How does it do that?

There are many ways from passkeys to SAML. Though for complex methods we may want a dedicated services outside the kernel.