# Is Nonce requried for the Authoziation Code flow

**URL:** <https://community.auth0.com/t/is-nonce-requried-for-the-authoziation-code-flow/111419>\
**Category:** Get Help\
**Tags:** oidc, protocols\
**Created:** [July 17, 2023, 12:06pm UTC](https://community.auth0.com/t/is-nonce-requried-for-the-authoziation-code-flow/111419 "2023-07-17T12:06:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IvanM](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@IvanM](https://community.auth0.com/u/IvanM)\
**Post date:** [July 17, 2023, 12:06pm UTC](https://community.auth0.com/t/is-nonce-requried-for-the-authoziation-code-flow/111419/1 "2023-07-17T12:06:05Z")

</div>

Hello community,

I’m implementing Authoziation Code flow via NodeJS Lambda AWS and I have a question about the Nonce.  
Is it needed when using the Authorization Flow? If not, could please help me to find some official document where it’s specified? What is the risk do not use the Nonce for the Authorization Code flow?

I added a nonce parameter to the authorize request, but it isn’t returned in the JWT token, so I assume it isn’t needed, but I need some proof why it’s OK to ignore nonce.

In all examples, the nonce is used with the Implicit Flow ( example [Mitigate Replay Attacks When Using the Implicit Flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/mitigate-replay-attacks-when-using-the-implicit-flow)), so I assume it isn’t needed for Authorization Code flow.

I wasn’t able to find a clear statement that nonce should not be used in the Authorization Code flow, but here is a related question on Okta forum  
“nonce is NOT required for response\_type = code according to [OIDC Spec 3.1.2.1. Authentication Request 218](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest)”  
[Authorization code flow: is the nonce parameter necessary? - #2 by Lijia - Questions - Okta Developer Community](https://devforum.okta.com/t/authorization-code-flow-is-the-nonce-parameter-necessary/12150/2)

Thanks

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [July 20, 2023, 2:31pm UTC](https://community.auth0.com/t/is-nonce-requried-for-the-authoziation-code-flow/111419/3 "2023-07-20T14:31:45Z")

</div>

> [@IvanM](#):
>
> Is it needed when using the Authorization Flow? If not, could please help me to find some official document where it’s specified?

According to the [OpenID Spec](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth), the nonce param is not required for the Auth Code Flow.

> [@IvanM](#):
>
> What is the risk do not use the Nonce for the Authorization Code flow?

They are there to prevent replay attacks, but in the case of Auth0, auth codes are single use and should prevent a replay attack as a result.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 3, 2023, 2:32pm UTC](https://community.auth0.com/t/is-nonce-requried-for-the-authoziation-code-flow/111419/4 "2023-08-03T14:32:27Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
