Relative Content

Tag Archive for amazon-web-servicesreact-nativeamazon-cognitoaws-amplify

How do I check whether a user is logged in and based on the auth state how do we navigate to different pages, in React Native with AWS Amplify Auth

I am creating an app with react native and using AWS amplify authentication. I want to create an authentication flow. I am following the docs to implement sign in, sign up, and sign out. These all are working fine. But the problem is I don’t know how to navigate based on the authentication state. Currently, when a log in is succesful, I want to navigate to the home screen, but I get the error that ‘The action ‘NAVIGATE’ was not handled by any navigator.’ But if i reload the app, then the app opens on the home screen. So I know that the user has been signed in correctly and the problem is something with navigation. I am using amplify V6.