aws-samples / amazon-cognito-passwordless-auth

Passwordless authentication with Amazon Cognito: FIDO2 (WebAuthn, support for Passkeys), Magic Link, SMS OTP Step Up
Apache License 2.0
382 stars 70 forks source link

ReferenceError: debug is not defined #174

Closed juanf9224 closed 5 months ago

juanf9224 commented 5 months ago

Hi, I'm getting an error when trying to get the magic link, it was working fine, and suddenly it started giving me that error, this is what my config looks like:

Passwordless.configureFromAmplify(
  Amplify.configure({
    ...awsConfig,
    region: awsConfig.aws_cognito_region,
    cognitoIdpEndpoint: awsConfig.aws_cognito_region,
    userPoolId: awsConfig.aws_user_pools_id,
    userPoolWebClientId: awsConfig.aws_user_pools_web_client_id,
  })
).with({
  fido2: {
    baseUrl: apiUrl,
    authenticatorSelection: {
      userVerification: 'required'
    },
    rp: {
      name: 'some-name,
      id: 'localhost'
    }
  },
  debug: console.debug
})

And this is the actual error:


ReferenceError: debug is not defined
    at respondToAuthChallenge (cognito-api.js:96:1)
    at eval (magic-link.js:38:47)
juanf9224 commented 5 months ago

Closing it as the error was on our side, some debugs were added locally and it was cached.