aws-amplify / aws-amplify/amplify-ui
Configure TOTP from within the app in Amplify UI v2
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 347
- Avg merge
- 18h 29m
- Merged PRs (30d)
- 9
Description
I'm trying to upgrade Amplify UI to v2 and since `AmplifyTotpSetup` has been removed from '@aws-amplify/ui-react' package, the question is what is the replacement for that in v2 to use it in ?
I want to allow my users to set up their 2FA from within the settings page of my app (i.e. not from the login page itself). For this, I want to show only the TOTP setup view from Amplify-UI - not the login/sign-up/etc view.
With Amplify-UI v1, I used the `AmplifyTotpSetup` as a standalone component to achieve this:
```
import { AmplifyTotpSetup } from '@aws-amplify/ui-react';
loadCognitoUser()}
className={classes.mfaEmbed}
/>
```
I already tried these:
- Finding the element that was used in Amplify v1 (`AmplifyTotpSetup`)
- Using Authenticator with initial state, but there is no initial state supported for Totp (`initialState?: 'signIn' | 'signUp' | 'resetPassword'`)
Any guide would be appreciated.
Related issue: https://github.com/aws-amplify/amplify-ui/issues/1150
Contributor guide
Research direction
Start with the v2 Authenticator entry point and the removed AmplifyTotpSetup component in @aws-amplify/ui-react, then review the related issue 1150. Determine whether v2 supports rendering only the TOTP setup flow from an account settings page rather than through login or sign-up. Done means the supported replacement or its absence is documented clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, react, typescript
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100