aws-amplify / aws-amplify/amplify-ui

Configure TOTP from within the app in Amplify UI v2

Open
#2,499 4 comments 1 reaction 0 assignees View on GitHub
AccountSettings feature-request
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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.