Amplify withAuthenticator React Native createSwitchNavigator Auth.signout() does not return to Sign In page
See original GitHub issuepackages:
"aws-amplify": "^1.1.6",
"aws-amplify-react-native": "^2.0.6",
"expo": "^30.0.1",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"react-navigation": "^2.16.0",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-thunk": "^2.3.0",
My project was created by expo init partyTime
with default tab navigators.
withAuthenticator
works. However, Auth.signout doesn’t go back to sign in page.
I’ve tried suggestions in here https://github.com/aws-amplify/amplify-js/issues/1529 , but without success.
There is no this.props.onStateChange
in the MainScreen component.
How do I pass onStateChange
from App.js export default withAuthenticator(App);
through <AppNavigators />
and into the Main component?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
React Native: AWS Amplify Auth.signOut() not working
If you're using React Native UI from Amplify and wrapped your component with withAuthenticator , below code should work.
Read more >The Complete React Native Guide to User Authentication with ...
In this tutorial, I will be covering mobile authentication using React Native and AWS Amplify. This guide will cover both React Native and ......
Read more >The Complete React Native Guide to User Authentication with the ...
This guide will cover both React Native and Expo. ... With Amplify you can incorporate username / password based authentication as well as...
Read more >A Complete Guide for Integrating AWS Amplify to React Native
The aws-amplify package also comes with a component called Auth that can be used to create custom sign out buttons and use the...
Read more >使用Amplify框架的完整React Native用户身份验证指南 - 0x资讯
用户名和密码认证; 受保护的路线; 监听认证事件; 基本认证 withAuthenticator HOC. 入门. AWS Amplify为想要使用实际生产就绪用户身份验证 ...
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
I figured it out. In App.js, add screenProps to AppNavigator component:
<AppNavigator screenProps={{...this.props}} />
screenProps will be passed to the Tab Navigator in the app.
Add a logout button somewhere in the app. On press:
You @hszeto are a legend. Thank you, this has been bugging me for months!