OAuth is used for consented sharing between third-party apps, connecting devices with online services (such as smart TVs), and controlling access to APIs via API gateways.