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

CognitoUser TypeScript definition missing challengeName #3733

Closed
kevinwolfcr opened this issue Jul 25, 2019 · 11 comments
Closed

CognitoUser TypeScript definition missing challengeName #3733

kevinwolfcr opened this issue Jul 25, 2019 · 11 comments
Assignees
Labels
Auth Related to Auth components/category good first issue Good for newcomers TypeScript Related to TypeScript issues

Comments

@kevinwolfcr
Copy link

Describe the bug
The CognitoUser TS definition exported from @aws-amplify/auth is missing challengeName on its interface, so whenever I try to check user.challengeName, I receive an error

Expected behavior
challengeName should be included in type definition for CognitoUser

Error

Property 'challengeName' does not exist on type 'CognitoUser'.

Dependencies:

  • @aws-amplify/auth: 1.2.28

Sample code
Sandbox: https://codesandbox.io/s/cognitouser-issue-hd7y1 (check src/index.ts file)

@haverchuck haverchuck added this to the Auth v2 milestone Jul 25, 2019
@haverchuck haverchuck added Auth Related to Auth components/category good first issue Good for newcomers TypeScript Related to TypeScript issues labels Jul 25, 2019
@kevinwolfcr
Copy link
Author

kevinwolfcr commented Jul 25, 2019

Related to #3316

@stale
Copy link

stale bot commented Aug 24, 2019

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
Copy link

stale bot commented Aug 31, 2019

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

@stale stale bot closed this as completed Aug 31, 2019
@ghost
Copy link

ghost commented Sep 21, 2019

@iamkevinwolf I can confirm this is still an ongoing issue as I've only just come across it. Its probably been abit too long for this reply to be of any good to you but for the interim as a quick fix i've resorted to the following:

export type AuthChallengeName =
  | "NEW_PASSWORD_REQUIRED"
  | "SMS_MFA"
  | "SOFTWARE_TOKEN_MFA"
  | "MFA_SETUP";

export type AuthUser =  CognitoUser & {
  challengeName: AuthChallengeName
}

furthermore, challengeParam is also not yet defined.....

@neiker
Copy link

neiker commented Oct 15, 2020

Stills missing on version 3.3.2

@devcshort
Copy link

Stills missing on version 3.3.2

Still missing in version 3.4.29. It's been over 2 years, seriously????????

@danielsharvey
Copy link

Still missing? Re-open?

@ortonomy
Copy link

why is this closed? both packages @aws-amplify/auth and aws-amplify { Auth } are missing the cognito:groups types on IDToken, too. shouldn't AWS have first-class support for typescript?

@abdallahshaban557
Copy link
Contributor

We are re-opening this issue to explore why this is happening. Thank you for the feedback! FYI @stocaaro @chrisbonifacio

@abdallahshaban557
Copy link
Contributor

Closing this issue since it was resolve with #10047

@github-actions
Copy link

github-actions bot commented Jul 9, 2023

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 amplify-help forum.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Auth Related to Auth components/category good first issue Good for newcomers TypeScript Related to TypeScript issues
Projects
None yet
Development

No branches or pull requests

9 participants