aws-amplify / aws-amplify/amplify-ui
FR (Vue Authenticator): Improve types for `useAuthenticator`
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 347
- Avg merge
- 18h 29m
- Merged PRs (30d)
- 9
Description
Originally posted by **@jakarlse88** January 2, 2023
I'm working on getting auth up and running in my Vue app using Amplify with Cognito, but I'm having trouble getting things set up. The [headless documentation](https://ui.docs.amplify.aws/vue/connected-components/authenticator/headless) states that retrieving `user` on `useAuthenticator` (which itself returns `any`) will return an object of type `AmplifyUser`.
I can't find any info either on the type itself or from where to import it. All I can find is a type `CognitoUser` in the package `amazon-cognito-identity-js`, but I don't know whether that matches. Any hint on where to look?
Contributor guide
Research direction
Start with the Vue headless documentation for useAuthenticator and trace the useAuthenticator entry point. Compare the documented AmplifyUser type with CognitoUser from amazon-cognito-identity-js, then determine how the returned user type should be exposed and imported. Done means the documented type and actual TypeScript API agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100