【发布时间】:2022-01-22 22:12:38
【问题描述】:
我一直在尝试从我的 React 本机应用程序(使用 Strapi)中注销已登录的用户。我应该将其重定向到任何特定的 URL 还是可以删除 JWT 令牌?如果是,请指出我正确的方向。 出于显而易见的原因,将“注销”按钮重定向到登录页面并不会结束已登录用户的会话。
<Button
mode="outlined"
onPress={() => navigation.navigate('Login')}
style={styles.button2}
labelStyle={{
color: '#48b749',
fontSize: 12,
fontWeight: 'bold',
textAlignVertical: 'center',
textAlign: 'center',
}}>
Logout
</Button>
【问题讨论】:
标签: reactjs react-native react-redux strapi