Why does nonce fail validation? Computed nonce does not match input

I am getting an error where the computed nonce does not match the input. Why is this?

1 Like

Often this will be a frontend issue, rather on the backend from the OAuth provider.

Frontend libraries can handle the passing of nonces differently. For example:

  1. Some OAuth libs cache the nonce and need to be flushed.
  2. Some OAuth libs hash the nonce and need to be explicitly configured to send a raw nonce.
  3. Some OAuth libs set up their own nonce and override yours e.g set useNonce: false in order to accept your custom nonce.

For example, using react-native-app-auth you can configure it as follows:

useNonce: false,
additionalParameters: {
  nonce: myNonce,
}
1 Like