I have a service which uses RedirectView to call another service. The second service then uses RedirectView to call a Microsoft Graph API endpoint to authenticate a user via OAuth2.
When the second service endpoint is called directly the Oauth2 works correctly, however when the first services is used to redirect to the second then MS Oauth2 authentication throws a redirect-uri incorrect error.
I have tried a couple of approaches to override the baseurl in Spring Oauth2 but none of them are working. This must be an issue people have had before.