OAuth separates authentication from authorization. You have four key roles:
Resource Owner: The user granting access.
Client: Your application requesting access.
Authorization Server: Issues tokens after user consent.
Resource Server: The API protecting user data.
OAuth doesn't authenticate users. It authorizes third-party access to user resources without sharing passwords. When you click "Login with Google," OAuth lets your app access your Google data without knowing your Google password.