Currently my application uses API requests to an amazon Cognito server (authentication server) to get auth tokens and when the application initializes it sends an API request to an amazon resource server to get some user details. But I want to combine these two API calls and reduce the loading time for the application when it loads.
API call for cognito server:
https://cognito-idp.us-west-1.amazonaws.com/body:{"AuthParameters" : {"USERNAME" : "...","PASSWORD" : "..." },"AuthFlow" : "USER_PASSWORD_AUTH","ClientId" : "..."}
API call for resource server:
{{base_url}}/user/flagwith auth token
Is there any possible way to combine above two requests?