Have you looked at a TP service like Auth0, Pathfix or Okta?