# Integration testing with auth0

**URL:** <https://community.auth0.com/t/integration-testing-with-auth0/79335>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [March 5, 2022, 2:36pm UTC](https://community.auth0.com/t/integration-testing-with-auth0/79335 "2022-03-05T14:36:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hayden.mcparlane](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hayden.mcparlane/32/35663_2.png) [@hayden.mcparlane](https://community.auth0.com/u/hayden.mcparlane)\
**Post date:** [March 5, 2022, 2:36pm UTC](https://community.auth0.com/t/integration-testing-with-auth0/79335/1 "2022-03-05T14:36:36Z")

</div>

Please include the following information in your post:

- **Which SDK this is regarding:** @auth0/auth0-spa-js
- **SDK Version:** 1.17.1
- **Platform Version:** 16
- **Code Snippets/Error Messages/Supporting Details/Screenshots:**

Auth0 Monitoring log error:  
Callback URL mismatch. [http://localhost:9000/?wtr-session-id=DHsFEOogFcd6wA-txqpom](http://localhost:9000/?wtr-session-id=DHsFEOogFcd6wA-txqpom) is not in the list of allowed callback URLs

**Is this a feature request or bug report?** Neither. It’s a question.

I’m currently trying to implement full integration testing in a system that uses auth0 for authentication/authorization. As a result, I’m trying to login and redirect back to the tests being run. I’ve added [http://localhost:9000](http://localhost:9000) to my test application for allowed redirects but the test runner auto-generates id’s appended to the url path which causes the error shown. So, my questions are:

1. Is there a way to specify a regex in allowed callback urls or some way to specify that all connections from a particular host and port should be allowed? I’ve tried using a wildcard for the url path in the auth0 management console but that doesn’t seem to be recognized.

2. If this isn’t possible, are there any others methods that can be used to successfully automate login for integration testing?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 14, 2022, 7:53pm UTC](https://community.auth0.com/t/integration-testing-with-auth0/79335/3 "2022-03-14T19:53:51Z")

</div>

Hey there @hayden.mcparlane welcome to the community! Where did you land on this?

> [@hayden.mcparlane](#):
>
> Is there a way to specify a regex in allowed callback urls or some way to specify that all connections from a particular host and port should be allowed? I’ve tried using a wildcard for the url path in the auth0 management console but that doesn’t seem to be recognized.

Unfortunately, wildcards for url paths are not supported as you’ve noticed - Only [subdomain wildcards](https://auth0.com/docs/get-started/applications/wildcards-for-subdomains#wildcard-url-placeholders) are.

> [@hayden.mcparlane](#):
>
> If this isn’t possible, are there any others methods that can be used to successfully automate login for integration testing?

While we don’t have any specific recommendations in this case, you can find our general tips on testing here:

- [Run Pre-Deployment Tests](https://auth0.com/docs/support/predeployment-tests)
- [Test Applications Locally](https://auth0.com/docs/dev-lifecycle/work-with-auth0-locally)
- [Get Management API Access Tokens for Testing](https://auth0.com/docs/tokens/management-api-access-tokens/get-management-api-access-tokens-for-testing)

Wish I could be of more help!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 28, 2022, 3:00pm UTC](https://community.auth0.com/t/integration-testing-with-auth0/79335/4 "2022-03-28T15:00:54Z")

</div>

This topic was automatically closed after 9 days. New replies are no longer allowed.
