# Is there a way to unit test Auth0 authentication with next JS

**URL:** <https://community.auth0.com/t/is-there-a-way-to-unit-test-auth0-authentication-with-next-js/60557>\
**Category:** Get Help\
**Created:** [April 5, 2021, 1:40pm UTC](https://community.auth0.com/t/is-there-a-way-to-unit-test-auth0-authentication-with-next-js/60557 "2021-04-05T13:40:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevintaylor1544](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kevintaylor1544/32/28566_2.png) [@kevintaylor1544](https://community.auth0.com/u/kevintaylor1544)\
**Post date:** [April 5, 2021, 1:40pm UTC](https://community.auth0.com/t/is-there-a-way-to-unit-test-auth0-authentication-with-next-js/60557/1 "2021-04-05T13:40:40Z")

</div>

I’m new to javascript programming and I have developed a next js project that uses auth0 for authentication. I have done simple unit tests before to check rest APIs. I basically want to unit test the authentication process and I couldn’t find any useful resources online on how to do it. Can anyone hook me up with some resources or guide on me how to go about it. Thanks in advance. [quickpayportal](https://www.quickpayportal.website/)

---

<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:** [April 6, 2021, 11:45am UTC](https://community.auth0.com/t/is-there-a-way-to-unit-test-auth0-authentication-with-next-js/60557/2 "2021-04-06T11:45:15Z")

</div>

Hey there!

We only offer general guidance in terms of testing. All the docs are here:

- [https://auth0.com/docs/best-practices/rules-testing-best-practices](https://auth0.com/docs/best-practices/rules-testing-best-practices)
- [https://auth0.com/docs/support/predeployment-tests?\_ga=2.50144558.92095721.1617690263-368752237.1616398056](https://auth0.com/docs/support/predeployment-tests?_ga=2.50144558.92095721.1617690263-368752237.1616398056)
- [https://auth0.com/docs/tokens/management-api-access-tokens/get-management-api-access-tokens-for-testing?\_ga=2.50144558.92095721.1617690263-368752237.1616398056](https://auth0.com/docs/tokens/management-api-access-tokens/get-management-api-access-tokens-for-testing?_ga=2.50144558.92095721.1617690263-368752237.1616398056)

---

<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:** [April 21, 2021, 11:45am UTC](https://community.auth0.com/t/is-there-a-way-to-unit-test-auth0-authentication-with-next-js/60557/3 "2021-04-21T11:45:22Z")

</div>

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