AWS re:Post을(를) 사용하면 다음에 동의하게 됩니다. AWS re:Post 이용 약관

How to log withAuthenticator to understand why this error is occurring when I try to sign in?

0

I am trying to sign in with a user that I have just created. Cognito even shows this user in the user pool: user pool

And the identity pool id matches up between the identity pool section of Cognito and aws-exports.js under 'aws_cognito_identity_pool_id'.

The code I have used is all from this tutorial and I have followed every step (https://blog.logrocket.com/aws-amplify-react-native-tutorial-examples/)

Can anyone help me work out why I am not able to progress to the signed in state? Providing some logs here would be helpful, but I am not used to withAuthenticator so I'm not sure whats the best way to do this.

import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { Amplify } from 'aws-amplify';
import awsExports from './src/aws-exports';
import { withAuthenticator } from '@aws-amplify/ui-react-native';
Amplify.configure(awsExports);
function App() {
  return (
    <View style={styles.container}>
      <Text>Open up App.js to start working on your app!</Text>
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

export default withAuthenticator(App)

screenshot of the error

2개 답변
0

Amazon Cognito supports several AWS services for monitoring and maintaining the reliability, availability, and performance of your organization and user activity:

AWS CloudTrail: Captures API calls from the Cognito console and code calls to the Cognito API operations. It records details like the IP address, who made the request, and when it was made, especially during user authentication events.

Amazon CloudWatch Logs: Allows you to send fine-grained logs of user activity to a log group, which can be helpful for troubleshooting issues like email and SMS message delivery to users.

Amazon CloudWatch Metrics: Enables you to monitor, report, and take automatic actions in near real-time based on various metrics related to your Amazon Cognito user pools. You can create dashboards or alarms based on these metrics.

Amazon CloudWatch Logs Insights: Allows you to configure CloudTrail to send events to CloudWatch for monitoring Amazon Cognito CloudTrail log files.

In summary, these AWS services provide comprehensive monitoring and logging capabilities for Amazon Cognito, allowing you to track user activity, API calls, and various metrics to ensure the reliability and performance of your authentication and authorization systems.

Additional information on how to setup and enable those logs can be found in Cognito Developer Guide Logging and monitoring

AWS
답변함 8달 전
profile picture
전문가
검토됨 8달 전
  • The cloudwatch logs for my app in the correct log group does not show any error as occurring. The same with the other places you mentioned there should be an error log

0

As your aim is to investigate and analyze API calls rather than usage patterns, the CloudTrail logs would be a valuable resource. CloudTrail captures a subset of API calls made to Amazon Cognito, recording them as events. This includes calls initiated from the Amazon Cognito console as well as those made through code calls to the Amazon Cognito API operations You can find additional information about CloudTrail and Cognito in this link as well as information about the CloudTrail Cognito sign-in events in this link

AWS
답변함 8달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠