aws-amplify / aws-amplify/docs
Serious confusion on Amplify MFA
- Dominant language
- MDX
- Stars
- 506
- Forks
- 1.1k
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 1
Description
user, username, current authenticated user, cognitouser ... so many users and they all get confused.
https://docs.amplify.aws/lib/auth/mfa/q/platform/js/
What is 'user' here?
```
// `user` is the current Authenticated user
Auth.setupTOTP(user).then((code) => {
```
is it the CognitoUser? If so, say it!!!!
What is 'username' here? The username of the login (in my case email address)?
```
const str = "otpauth://totp/AWSCognito:"+ username + "?secret=" + code + "&issuer=" + issuer;
```
What is 'user' here? Is it the same as gets fed into ```Auth.setupTOTP(user) ```?
```
// Use the generated one-time password to verify the setup
Auth.verifyTotpToken(user, challengeAnswer)
```
Why does CognitoUser.getUserName() generate an error saying
```
Error: TypeError: this.cognitoUser.getUsername is not a function
```
That single page is all we have to go on and it's a nightmare of confusion.
Contributor guide
Assessment
This issue has not been assessed yet.