aws-amplify / aws-amplify/amplify-ui

FR (Vue Authenticator): Improve types for `useAuthenticator`

Open
#3,937 0 comments 0 reactions 0 assignees View on GitHub
Authenticator feature-request TypeScript Vue
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.