OAuth enhances security by eliminating the need for sharing passwords. When a user grants access to an application via OAuth, the application receives a token rather than the user’s credentials. This reduces the risk of data breaches and unauthorized access. Additionally, OAuth tokens are often time-limited and can be revoked at any time by the user, offering greater control and security.