Authenticating 2 subdomains on the same host using a single app

I have 2 apps that are running on the same host but have different subdomains, i.e

The error I’m receiving is

cannot fetch token: 403 Forbidden Response: {"error":"unauthorized_client","error_description":"The redirect URI is wrong. You sent https://subdomain-app.domain.com, and we expected https://subdomain.domain.com"}

How can I have those 2 subdomains authenticate using a single app?
Can I ‘federate’?