Auth0 Home Blog Docs

User profile is not available

react
redux

#1

I am following the https://github.com/auth0-samples/auth0-react-samples/ (see 02-User-Profile sample),
in this sample, getProfile is used to retrieve the user information.
The username is then used to call Redux actions, but the username is not immediately available and hence, the Redux actions fail.
How could I ensure that the pages are loaded only after the getProfile has been run and userProfile info is available? I am using React Router 4.


#2

I checked the linked sample and also the React quickstart and could not locate the part about username being used in actions. I might have missed something, but assuming you’re extending beyond the sample code and you’re looking for React specific advice about possible ways to handle asynchronous operations within your application then I suggest you to use more general Q&A site like StackOverflow where knowledge on React surpasses the one found on a site specific to authentication and authorization services. From a quick research it seems this might be relevant: http://redux.js.org/docs/advanced/AsyncActions.html


#3