1 article on this topic.
A custom identity provider is a trap when you build commodity AuthN. The better path is an identity control plane.