# Sharing one Okta app across multiple services in local environment

**URL:** <https://devforum.okta.com/t/sharing-one-okta-app-across-multiple-services-in-local-environment/29536>\
**Category:** OAuth/OIDC\
**Created:** [July 22, 2024, 5:41pm UTC](https://devforum.okta.com/t/sharing-one-okta-app-across-multiple-services-in-local-environment/29536 "2024-07-22T17:41:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oorobets](https://avatars.discourse-cdn.com/v4/letter/o/e95f7d/32.png) [@oorobets](https://devforum.okta.com/u/oorobets)\
**Post date:** [July 22, 2024, 5:41pm UTC](https://devforum.okta.com/t/sharing-one-okta-app-across-multiple-services-in-local-environment/29536/1 "2024-07-22T17:41:25Z")

</div>

I have following problem. My company deals with 100+ services. All of them are sharing the same domain, but different sub domains. Configuring one Okta application for all of them **is not** a problem (we just use wildcard redirect urls). Everything works well in production and in lower environments, where we use proper company domain.  
However, I’m struggling to find a solution for local development, since all services running on a different `port` for localhost. It seems like port can’t we wildcard-ed, nor entire host address.  
Creating 100+ okta apps that would facilitate local development is not an option.

Currently Okta app integration is configured to use:  
Sign-in method: OIDC  
Application type: SPA

What would be the best course of action in this situation?  
I would really want to keep environments as close as possible.

Thank you

---

<div class="post-metadata">

**Author:** ![nikitag](https://avatars.discourse-cdn.com/v4/letter/n/ce7236/32.png) [@nikitag](https://devforum.okta.com/u/nikitag)\
**Post date:** [August 19, 2024, 10:31am UTC](https://devforum.okta.com/t/sharing-one-okta-app-across-multiple-services-in-local-environment/29536/2 "2024-08-19T10:31:27Z")

</div>

Hi @oorobets

As far as Okta is concerned, wildcard can be used only for subdomain. However you could add redirect uris of all your locally run applications in a single Okta application (no need for 100+ Okta apps).  
Alternatively you could configure local hosts file along with something like nginx to take care of subdomain list which routes to your locally hosted services. Then you can just use wildcard redirect uris

hope this helps.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [September 18, 2024, 10:32am UTC](https://devforum.okta.com/t/sharing-one-okta-app-across-multiple-services-in-local-environment/29536/3 "2024-09-18T10:32:01Z")

</div>

Closed on September 18, 2024, 10:32am UTC

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