Please document optional OAuth 2.0 authorization flow parameter "nonce"
Imagine the following attack for the OAuth 2.0 authorization flow:
- Attacker steals the authorization code from the redirect URI.
- Attacker forces his instance of the client to redeem the victim's authorization code.
- If the attacker's instance of the client is faster than the victim's instance of the client in redeeming the authorization code, the attacker will get a valid login session within his instance of the client, but for the victim's account.
This attack should especially get attention in the context of Twitch and live streaming, since many streamers are definitely not aware of this vulnerability: If people are logging in with Twitch on 3rd party sites while live streaming, an attacker that has automated this attacking process (e.g. by capturing the stream) can easily grab the authorization code from the visible browser address bar during the streamer's login attempt, except ...
... the OAuth 2.0 PKCE extension is used by the client, which prevents the attack in the following way:
- A hashed secret (using a cryptographic hash function) is send using the nonce parameter of the initial authorization request (leading to the Twitch login page).
- Later, the authorization server (that is used to redeem authorization codes) is sending back the same nonce together with the access token.
The back end implementation (that also securely stores the client secret and makes the call to this authorization server) can now verify whether the nonce sent back from the authorization server is indeed the hashed value of the specific secret.
An attacker that does not know the secret should now longer be able to force the back end to authorize him with the victim's permissions.
Of course, the secret is bound to the authentication session and only visible to an attacker in its hashed form (the nonce) within the initial authentication request.
A few months ago someone suggested to support the OAuth 2.0 authroization flow PKCE extension. 
I don't know if the nonce usage above is exactly the same as PKCE, but it at least prevents attack scenarios like the one that I just described.
Currently, the documentation does not mention this nonce parameter being available for the OAuth 2.0 authorization flow.  It should be added with a short description, similar to the other optional parameters like state or force_verify to make people aware of it.
This user voice is a clone of this thread in the forum. 
For anyone reading this, the nonce described in the Oauth standard is not used for PKCE. The nonce is used to prevent replay attacks when using OpenIdConnect. 
There is a separate uservoice request for PKCE support. 
I highly suggest we go forward with PKCE support as it prevents the described attack method in this post. 
Current best practices from IEFT say "Public clients MUST use PKCE" and "For confidential clients, the use of PKCE [RFC7636] is RECOMMENDED". 
The attack vector described is also the reason why implicit auth should be deprecated in favor of PKCE Authorization Code Flow.