The obvious solution to all these problems is to not implement them yourself and use a platform like Auth0 or WorkOS.
That’s not the worst perspective to prioritize when building a B2B SaaS product.
You’re right of course about the risk / the trust you’ll have to put into a third party.