问题标签 [cognito]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
angular - Angular - Wait for refresh session before call API
I have an angular app using AWS Amplify for user management. In my main app component, i use auth.currentAuthentificatedUser to get user data to call APIs with the right token. But my API calls are done to fast, before the auth.currentAuthentificatedUser. How can I handle this?
Main app component:
homepage component calling APIs