# How can I automate the recovery of a code for automated tests?

**URL:** <https://community.auth0.com/t/how-can-i-automate-the-recovery-of-a-code-for-automated-tests/78438>\
**Category:** Get Help\
**Tags:** spa, pkce, testing, login, auth0\
**Created:** [February 17, 2022, 12:46am UTC](https://community.auth0.com/t/how-can-i-automate-the-recovery-of-a-code-for-automated-tests/78438 "2022-02-17T00:46:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![salomonjc](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/salomonjc/32/35275_2.png) [@salomonjc](https://community.auth0.com/u/salomonjc)\
**Post date:** [February 17, 2022, 12:46am UTC](https://community.auth0.com/t/how-can-i-automate-the-recovery-of-a-code-for-automated-tests/78438/1 "2022-02-17T00:46:03Z")

</div>

Hi,

I have been commissioned to automate a website with Auth0 authentication (Authorization Code Flow). I have researched that it uses PKCE and SPA.

I was checking that it sends the following variables: auth0Client, code\_challenge, nonce, state, client\_id. How to create these variables?

How can I automate the recovery of a code for automated tests?

I thank you a lot in advance,

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 17, 2022, 12:11pm UTC](https://community.auth0.com/t/how-can-i-automate-the-recovery-of-a-code-for-automated-tests/78438/2 "2022-02-17T12:11:15Z")

</div>

Hey there!

Unfortunately we don’t have any content or guidance on that front just yet so I encourage you to file in product feedback regarding that using our Feedback category:

> **[Feedback](https://community.auth0.com/c/feedback/95)**
>
> Submit and vote on product feedback and feature requests.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 22, 2022, 2:28pm UTC](https://community.auth0.com/t/how-can-i-automate-the-recovery-of-a-code-for-automated-tests/78438/3 "2022-02-22T14:28:21Z")

</div>


