gpt4 book ai didi

amazon-web-services - Amplify 中没有经过身份验证的用户的当前用户

转载 作者:行者123 更新时间:2023-12-03 22:09:19 24 4
gpt4 key购买 nike

我正在使用 react-native 和开箱即用的 aws-amplify-react-native 来登录、注册用户。用户能够成功进行身份验证,但在登录表单“无当前用户”中收到以下错误

我提高了日志级别以在应用程序中进行调试。我可以看到用户成功验证并取回 JWT token ,但我在日志中看到以下内容:

[DEBUG] 22:47.149 AuthClass - Failed to get user from user pool
[ERROR] 22:47.154 AuthClass - Failed to get the signed in user No current user
[DEBUG] 22:47.161 AuthPiece - No current user

下面是我的代码片段:
import { ConfirmSignIn, ConfirmSignUp, ForgotPassword, RequireNewPassword, SignIn, SignUp, VerifyContact, withAuthenticator } from 'aws-amplify-react-native';

const RootStack = createStackNavigator(
{
Login: LoginScreen,
Main: MainScreen,
Customer: CustomerScreen,
Reports: ReportsScreen,
Signup: SignupScreen
},
{
initialRouteName: 'Main',
}
);

const AppContainer = createAppContainer(RootStack);

export class App extends React.Component {
render() {
return (
<AppContainer />
);
}
}

export default withAuthenticator(App);

当我运行我的应用程序时。我看到 Amplify 的默认登录表单,我用它来输入用户名和密码,然后单击“登录”按钮,该按钮成功进行了身份验证,但出现“无当前用户错误”,如上所示。

最佳答案

我有类似的问题。我从配置方法中删除了 cookie 存储块并且它起作用了。

关于amazon-web-services - Amplify 中没有经过身份验证的用户的当前用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55497697/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com