aws-amplify / amplify-ui

Amplify UI is a collection of accessible, themeable, performant React (and more!) components that can connect directly to the cloud.
https://ui.docs.amplify.aws
Apache License 2.0
889 stars 282 forks source link

Passwordless login (Login with OTP) in the Authenticator component. #3358

Open Swastik-achar opened 1 year ago

Swastik-achar commented 1 year ago

On which framework/platform would you like to see this feature implemented?

React

Which UI component is this feature-request for?

Authenticator

Please describe your feature-request in detail.

While searching for passwordless login I came across the custom Auth challenge provided by Cognito. If this gets embedded in the Authenticator component based on a flag from aws-exports.js that will be a great help rather than writing the custom components to enable this feature.

Please describe a solution you'd like.

Is there any possibility of incorporating this feature in the Authenticator component, we can have a flag loginWithOTP in aws exports and depending on this we can change the flow of authenticator component (password flow or OTP flow).

NOTE: Password Flow: Current behavior of Authenticator component with Email and Password OTP Flow : It will contain only Email field in the first screen, once submitting the email it should trigger an OTP which we can enter in the second screen and then on the click of Login button authentication should happen.

We love contributors! Is this something you'd be interested in working on?

reesscot commented 1 year ago

Thank you for your feature suggestion, we will consider it as we plan out the Authenticator roadmap!

Swastik-achar commented 1 year ago

Thanks for the reply @reesscot, can you please keep me posted on the release of this feature.

akshaykkgit commented 1 year ago

Very useful feature.

Swastik-achar commented 1 year ago

@reesscot when can we expect this feature to be released?

akhil-c-k commented 1 year ago

Hi @reesscot in my projects we are using amplify and we are expecting this feature. instead of customizing if you could enable this feature in amplify itself it will be great. it can be implemented in multiple projects if this feature is available. if it is released early then probably within next two weeks my team can use it and go for our product next module release.

reesscot commented 1 year ago

Hi @akhil-c-k and @Swastik-achar. Thanks for your interest in this feature, however, this is not currently on this year's roadmap. We will update this ticket when we have a better idea of when it will be supported.

Swastik-achar commented 1 year ago

Hi @reesscot. I'm trying to build this feature, but currently stuck and need assistance to move forward. Created a button in SignIn page (named as Login with OTP) and it's respective components. Currently stuck at linking the component to the "on click" event of this button. Can someone please help me out?

reesscot commented 1 year ago

@Swastik-achar Currently this isn't possible using the Amplify JS Authentication category. We do have this feature on our roadmap. If this is something you need sooner, I would take a look at: https://aws.amazon.com/blogs/mobile/implementing-passwordless-email-authentication-with-amazon-cognito/

Swastik-achar commented 1 year ago

Thanks @reesscot, I was able to figure out the way to address it and have implemented. Currently the functionality is working in React and trying to get it done for other frameworks as well. Upon completion across frameworks, can the PR be considered for review and add the feature to the Amplify-UI component or it has to go by the Roadmap only?