Re:Show HN: We built an open-source OAuth service for 40 APIs
by kissgyorgy on Wednesday February 08, 2023 @10:35AM
(#34709473)
What I'm doing is have a _separate_ encryption key for _each_ OAuth provider on the server, encrypt with that and save it in a HTTPOnly browser cookie. This way if the key gets stolen from the server, the attacker doesn't even have any user OAuth tokens. If the cookies are stolen from the user's browser, the attacker can't do anything with it. If one user's cookie is stolen AND the encryption key is stolen, only one user is affected. As the cookie is HTTPOnly, there is no XSS surface, the client need to communicate with the server to be able to API requests to the OAuth provider.
[ Parent
| on HN ]
There are no comments on this comment yet.