Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth.verifyUserAttribute() does not handle clientMetadata #6080

Closed
damien-monni opened this issue Jun 12, 2020 · 5 comments
Closed

Auth.verifyUserAttribute() does not handle clientMetadata #6080

damien-monni opened this issue Jun 12, 2020 · 5 comments
Labels
Auth Related to Auth components/category pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days.

Comments

@damien-monni
Copy link

damien-monni commented Jun 12, 2020

I want to resend the email verification code on user request so I try to use Auth.verifyUserAttribute:

const user = await Auth.currentAuthenticatedUser();
await Auth.verifyUserAttribute(user, 'email');

// I also tried:
await Auth.verifyUserAttribute(user, 'email', { foo: 'bar' });

I need to send clientMetadata that are set on Auth.configure but it seems that no metadata are sent.

I don't understand why because it seems to be implemented:

clientMetadata: ClientMetaData = this._config.clientMetadata

Any help would be very appreciated.

To reproduce:

 Auth.configure({
    ...
    clientMetadata: {
      foo: 'bar',
    },
  });

...

Auth.verifyUserAttribute(user, 'email');

Then log metadata on the customMessage lambda trigger. They won't be set.

@damien-monni damien-monni added the to-be-reproduced Used in order for Amplify to reproduce said issue label Jun 12, 2020
@amhinson amhinson added the Auth Related to Auth components/category label Jun 12, 2020
@sammartinez
Copy link
Contributor

@damien-monni Can you provide us with your package.json? Thanks ahead of time!

@sammartinez sammartinez added pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. and removed to-be-reproduced Used in order for Amplify to reproduce said issue labels Jun 15, 2020
@damien-monni
Copy link
Author

@sammartinez sure:

{
  "name": "keep-blogging-front",
  "version": "0.0.0",
  "author": "",
  "license": "ISC",
  "scripts": {
    "dev": "next -p 3030",
    "build": "next build",
    "start": "next start -p 3030"
  },
  "dependencies": {
    "@anzerr/base.util": "^1.0.10",
    "@apollo/react-hooks": "^3.1.5",
    "@apollo/react-ssr": "^3.1.5",
    "@aws-amplify/auth": "^3.2.13",
    "@aws-amplify/core": "^3.3.3",
    "@aws-amplify/storage": "^3.2.6",
    "@material-ui/core": "^4.10.2",
    "@material-ui/icons": "^4.9.1",
    "@material-ui/lab": "^4.0.0-alpha.56",
    "@material-ui/pickers": "^4.0.0-alpha.8",
    "apollo-cache-inmemory": "^1.6.6",
    "apollo-client": "^2.6.10",
    "apollo-link-context": "^1.0.20",
    "apollo-link-http": "^1.5.17",
    "chroma-js": "^2.1.0",
    "clsx": "^1.1.1",
    "dotenv": "^8.2.0",
    "get-video-id": "^3.1.4",
    "graphql": "^15.1.0",
    "graphql-tag": "^2.10.3",
    "i18next": "^19.4.5",
    "isomorphic-unfetch": "^3.0.0",
    "medium-zoom": "^1.0.5",
    "moment": "^2.26.0",
    "next": "^9.4.4",
    "nprogress": "^0.2.0",
    "quill": "^1.3.7",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-i18next": "^11.5.1",
    "react-motion": "^0.5.2",
    "react-simple-maps": "^0.12.1"
  },
  "devDependencies": {
    "babel-eslint": "^10.1.0",
    "eslint": "^6.8.0",
    "eslint-plugin-react": "^7.20.0",
    "jimp": "^0.9.8",
    "react-ssr-prepass": "^1.2.1"
  }
}

@stale stale bot removed the pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. label Jun 16, 2020
@stale
Copy link

stale bot commented Jul 18, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. label Jul 18, 2020
@stale
Copy link

stale bot commented Jul 25, 2020

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Auth Related to Auth components/category pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants