Re:PKCE: What and Why
by mooreds on Saturday December 05, 2020 @08:53PM
(#25320271)
Don't forget if you are using a public client, you need to be concerned not just with the client secret, but also with the access token. Unless the token is sender constrained (via MTLS, DPOP or something similar), anyone who gets it can use it to access whatever resources it grants permission to.
While losing a client secret to an attacker is obviously worse, because it allows for repeated grant requests, losing an access token can be bad too.
So, be aware of both things when you are running in a client like a browser or mobile application which can't be trusted to keep a secret. You can try to minimize the risk by using a HttpOnly cookie for the browser or secure storage (keychain, etc) on a mobile app, as well as keeping your token lifetimes short.
While losing a client secret to an attacker is obviously worse, because it allows for repeated grant requests, losing an access token can be bad too.
So, be aware of both things when you are running in a client like a browser or mobile application which can't be trusted to keep a secret. You can try to minimize the risk by using a HttpOnly cookie for the browser or secure storage (keychain, etc) on a mobile app, as well as keeping your token lifetimes short.
Disclosure: I work for an IDaaS provider.