aws-amilfy 6.13.1
aws-config.jsi
mport { Amplify } from "aws-amplify";
const awsExports = {
Auth: {
region: 'us-west-1',
userPoolId: 'us-west-1_mJ0nwfHd2',
userPoolWebClientId: '5132d0n28h947jm6gv4t06n2vl',
authenticationFlowType: 'USER_PASSWORD_AUTH',
aws_cognito_identity_pool_id: undefined, // Prevent Amplify from expecting federated identity pools
},
Storage: {
AWSS3: {
bucket: import.meta.env.VITE_S3_BUCKET_NAME,
region: import.meta.env.VITE_COGNITO_REGION,
},
},
};
console.log("Amplify Configuration:", awsExports);
Amplify.configure(awsExports);
export default Amplify;
The error
Amplify Configuration: {Auth: {…}, Storage: {…}}Auth: authenticationFlowType: "USER_PASSWORD_AUTH"aws_cognito_identity_pool_id: undefinedregion: "us-west-1"userPoolId: "us-west-1_mJ0nwfHd2"userPoolWebClientId: "5132d0n28h947jm6gv4t06n2vl"[[Prototype]]: ObjectStorage: {AWSS3: {…}}[[Prototype]]: Object
Amplify.ts:63 Uncaught TypeError: Cannot read properties of undefined (reading 'loginWith')
at AmplifyClass.notifyOAuthListener (Amplify.ts:63:49)
at AmplifyClass.configure (Amplify.ts:41:14)
at Object.configure (initSingleton.ts:41:21)
Could you please help?