We are looking to utilize the token exchange flow for communications using access tokens from two different internal UI clients, which both have 2 separate Authorization Servers. App/AuthServer1 and App/AuthServer2
I can achieve generating an access token using the token exchange grant.
- App1 signs the user in as normal via authorization code flow in App1/AuthServer1
- App1 access token is exchanged via using an Okta API service application for a token from AuthServer2.
The issue is, both Auth Servers have different Audiences, and a token generated using this flow will have the Audience of AuthServer1, which is incompatible with all our backend API services secured by AuthServer2.
Ideally, when the AuthServer1 token is exchanged via AuthServer2 and it is enriched with the AuthServer2 Audience.
Is there a recommended/possible approach to deal with this scenario, opposed to adding compatibility to the individual API apps or changing the audiences to be consistent across AuthServers?
Thanks in advance