question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

aws-amplify/ui-react - renders component when user is not signed in

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jordanranzcommented, Jun 17, 2020

@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

0reactions
github-actions[bot]commented, May 20, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found