Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OAuth token security

As far as I know, the OAuth standard is very lax on how OAuth really should behave, but...

I store OAuth access tokens for various OAuth services in a database. If these tokens were compromised, could they be used by a third party? I.e., are the given tokens bound to only my api and secret keys?

like image 792
Henrik Paul Avatar asked Aug 18 '11 09:08

Henrik Paul


1 Answers

The tokens are tied to a given service and user. With those, one can pretend to be that user. It is not tied to any IP address or device UUID for example (although one could do that as an additional precaution, but that is not part of OAuth).

If they were compromised, you'd deauthorize them, thus making them worthless.

could they be used with different API and secret keys?

No. The access token are also tied to the application they were issued for.

This way the user can de-authorize on a by-application basis, and every app can have a different set of permissions (e.g. read-only access).

like image 87
Thilo Avatar answered Nov 12 '22 00:11

Thilo