jobima
jobima

Reputation: 5920

OAuth2: What is the "client"?

When using OAuth2 system in an API we talk about client_id and client_secret. What exactly is a client? Is it a person/user? Or is it the platform? iPhone, Android, etc.?

Upvotes: 1

Views: 129

Answers (2)

Satish P
Satish P

Reputation: 524

Client in most cases is the App.

In OAuth you have 3 roles, ServiceProvider, ResourceOwner and Client. There is also an additional role for Authorization server but for most implementations AuthServer and ServiceProvider are both the same.

I can give you an example that will help you understand better.

  • Take the app 'Tweetdeck' that you want to use to post tweets onto your Twitter account.
  • Here, Tweetdeck is a client, You are resource owner and Twitter is the ServiceProvider and AuthServer.
  • Tweetdeck(Client) will need your permission(login) to access your Twitter Account (Resources) on Twitter(Service Provider).
  • So the Tweekdeck team will signup with Twitter for a Client Account for which Twitter issues them a client_id and client_secret.

OAuth is a specification that standardizes this interaction.

Upvotes: 2

pgtips
pgtips

Reputation: 1338

The client is a computer/device which sends requests to the server. The server responds to the clients requests.

Upvotes: 0

Related Questions