aws-amplify/ui-react - renders component when user is not signed in
See original GitHub issueDescribe the bug
@aws-amplify/ui-react": "^0.2.3
With
export default withAuthenticator(App)
user is not signed in but App
is still “rendered” (though not visible). The useEffect hooks are triggered, indicated that it was rendered. the App
should not be rendered until a user has signed in.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (6 by maintainers)
Top Results From Across the Web
AWS Amplify - How to render components after sign in
I want to be able to only load (or reload) a TaskList component only when the user has successfully signed in. However, the...
Read more >Headless | Amplify UI for React
To prevent undesired re-renders, you can pass a function to useAuthenticator that takes in Authenticator context and returns an array of desired context...
Read more >Amplify UI's new Authenticator component makes it easy to ...
In this blog post we will deploy a React app with Amplify Hosting, set up auth, and then integrate the <Authenticator> UI component...
Read more >AWS Amplify - How to render components after sign in-Reactjs
I managed to solve it using hints given in this answer AWS Amplify: onStatusChange then render main page. Basically, I changed my App...
Read more >4. Introduction to Authentication - Full Stack Serverless [Book]
If the user tries to access a protected route when they are not signed in, ... npm install aws-amplify @aws-amplify/ui-react antd react-router-dom.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mtliendo this is good feedback. It auto closes from the hook in the PR but it may be better to hold off on using that.
@kmbro and @trungtin, this is a known limitation to the web component default slot. The recommended way to to manage the application mounting would be to use this guide: https://docs.amplify.aws/ui/auth/authenticator/q/framework/react#manage-auth-state-and-conditional-app-rendering
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels or Discussions for those types of questions.