# Require a code\_challenge and code\_verifier on auth code with PKCE grant

**URL:** <https://community.auth0.com/t/require-a-code-challenge-and-code-verifier-on-auth-code-with-pkce-grant/18950>\
**Category:** Get Help\
**Tags:** authorization-code-f, pkce\
**Created:** [December 11, 2018, 3:37pm UTC](https://community.auth0.com/t/require-a-code-challenge-and-code-verifier-on-auth-code-with-pkce-grant/18950 "2018-12-11T15:37:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlnaps](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jlnaps/32/12842_2.png) [@jlnaps](https://community.auth0.com/u/jlnaps)\
**Post date:** [December 11, 2018, 3:37pm UTC](https://community.auth0.com/t/require-a-code-challenge-and-code-verifier-on-auth-code-with-pkce-grant/18950/1 "2018-12-11T15:37:26Z")

</div>

In order to support native apps, we are using the auth code flow with PKCE. In testing things though, we’ve found that if an authorization request is made without a code\_challenge and code\_verifier, the request will proceed as normal. When the auth code returns to the application, the application can then use that code to obtain a token without any kind of verifier or secret information.

We want to require that auth code flows with native apps require that a code\_challenge and code\_verifier be present in the authorization request. Is there a toggle in the Auth0 tenant or app configuration to require this? If not, we could probably throw together a rule to perform the check for us, but if we can let the configuration do it for us, that would be easier.

Thanks!

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [December 12, 2018, 11:50am UTC](https://community.auth0.com/t/require-a-code-challenge-and-code-verifier-on-auth-code-with-pkce-grant/18950/2 "2018-12-12T11:50:02Z")

</div>

Hi @jlnaps.  
There’s currently no setting to enforce usage of the PKCE.  
As you know, the purpose of the PKCE is to ensure that the authorization code can only be exchanged by the application that made the authorization request, but it’s the application responsibility to properly implement this security measure (as one of many other things that an application needs to do to ensure proper security).

I understand the motivation to enforce this to ensure usage of best practices, though. There are ongoing efforts on this area but, even so, I’d suggest that you make a feature request at [Auth0: Secure access for everyone. But not just anyone.](https://auth0.com/feedback) to be taken into consideration by the product team.

---

<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:** [January 11, 2019, 11:50am UTC](https://community.auth0.com/t/require-a-code-challenge-and-code-verifier-on-auth-code-with-pkce-grant/18950/3 "2019-01-11T11:50:02Z")

</div>

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