amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

Cognito Passwordless

Open jamilsaadeh97 opened this issue 1 year ago • 30 comments

Hello,

I want to check if the new Cognito passwordless workflow will be supported in Amplify Flutter. I saw that Amplify Swift and Android released this feature and I'm interested in adding this workflow to my apps. If yes, could you provide an estimate if it's planned to be released soon?

Thank you!

jamilsaadeh97 avatar Nov 27 '24 12:11 jamilsaadeh97

Hi @jamilsaadeh97, thanks for your interest in the Cognito passwordless workflow for Amplify Flutter! We are looking into integrating this feature as well, however we can't provide any timelines yet. Please let me know if you have any other questions I can help with!

ekjotmultani avatar Nov 27 '24 18:11 ekjotmultani

Hi @ekjotmultani Thank you for the update!

jamilsaadeh97 avatar Nov 27 '24 18:11 jamilsaadeh97

In the meantime, are any workarounds available to support passwordless sign-in using the existing APIs? Thanks!

davidcaseria avatar Dec 20 '24 21:12 davidcaseria

Hello @davidcaseria, we don't have any work around currently for using passwordless with existing APIs. We don't have a timeline for passwordless implementation yet, but the other Amplify libraries (JavaScript, Android, iOS) recently released this feature. We will post an update here once the feature is released!

tyllark avatar Dec 26 '24 17:12 tyllark

Is this released yet ?

amankachhal99 avatar Jul 23 '25 02:07 amankachhal99

@amankachhal99 The team is currently working on supporting this on Flutter, we will post an update on the issue once this is done.

harsh62 avatar Jul 23 '25 13:07 harsh62

@harsh62 .. thanks for reply.

Any timeline for release? Insight in this week help us to plan our tasks.

amankachhal99 avatar Jul 23 '25 13:07 amankachhal99

@amankachhal99 We don't have a timeline yet, but we are actively developing the feature. May be something end of next month.

NOTE: Please keep in mind that this timeline could change and is not a commitment for delivery.

harsh62 avatar Jul 23 '25 13:07 harsh62

Hi @tyllark, @harsh62 I see that this PR is merged.. I understand you guys must be having your own feature priority list. But i just wanted to request if this feature release can be prioritised. We are pending for this feature and lot of big features in my app are blocked because of this.

Just wanted to see if there is any way to bring more attention to this.. :)

Cheers to all the amazing work you guys are doing.. 👍

amankachhal99 avatar Aug 05 '25 08:08 amankachhal99

Just adding 👍 that I would love to see this ASAP

jhw avatar Aug 08 '25 06:08 jhw

Hi @jhw and @amankachhal99. @tyllark is working hard on the passwordless support. We are going to release the first part (passwordless with email and sms OTP) as soon as it's ready, and then follow up with webAuthN support afterwards. I do not have a date but rest assured it is a priority.

mattcreaser avatar Aug 08 '25 19:08 mattcreaser

Adding comment too as it's urgently required in my project too and all other amplify sdk already have it. Sad too not see in flutter amplify.
Please help to bring it soon. 🫰

hrmanika-blip avatar Aug 11 '25 22:08 hrmanika-blip

Hi team,

This feature is really important for our project, and we’ve been waiting for it on an urgent basis. Our team is kind of stuck without it, so it would be awesome if you could release it ASAP.

Thanks a lot for all the great work you’re doing really looking forward to seeing this one go live!

gauravsenpai23 avatar Aug 12 '25 08:08 gauravsenpai23

Hi @mattcreaser , @harsh62 @tyllark , As we approach the end of the month, I wanted to kindly check if there is a concrete timeline for the release of this feature. Many people are eagerly awaiting it, so any update would be greatly appreciated.

Thank you and best regards,

amankachhal99 avatar Aug 27 '25 01:08 amankachhal99

Hello @amankachhal99, we do not have a concrete date set yet. We paused development on the feature for a couple weeks to to focus on operation issues, but Passwordless is back to being my primary focus now. Once phase 1 of the feature (passwordless with email and sms OTP without Authenticator) is being reviewed internally I will provide you with a pubspec override for the feature branch, so you can get a head start on updating your app.

tyllark avatar Aug 28 '25 16:08 tyllark

Hi @tyllark , Any update on the feature ? it has already been months for the feature request. I feel flutter library is already way behind other language libraries. :(

amankachhal99 avatar Sep 29 '25 05:09 amankachhal99

Hello @amankachhal99, thank you for your patients I understand the delay has been frustrating. I'm wrapping up documentation change and waiting for final sign off before we can create the final Pull Requests. Ill provide the pubspec override I promised later today, so you can start updating your app.

tyllark avatar Sep 29 '25 12:09 tyllark

Ok Waiting.

amankachhal99 avatar Sep 29 '25 13:09 amankachhal99

Hello @amankachhal99, Here are the steps for how you can test the Passwordless changes in your app:

  1. Enable Passwordless in Cognito, I did this by updating my amplify/backend.ts file as follows:
import { defineBackend } from '@aws-amplify/backend';
import { auth } from './auth/resource';

const backend = defineBackend({
  auth,
});

const { cfnResources } = backend.auth.resources;
const { cfnUserPool, cfnUserPoolClient } = cfnResources;

// enable ASF
cfnUserPool.userPoolAddOns = {
  advancedSecurityMode: "AUDIT",
}

// Specify which authentication factors you want to allow with USER_AUTH
cfnUserPool.addPropertyOverride(
	'Policies.SignInPolicy.AllowedFirstAuthFactors',
	['PASSWORD', 'EMAIL_OTP', 'SMS_OTP']
);

// The USER_AUTH flow is used for passwordless sign in
cfnUserPoolClient.explicitAuthFlows = [
	'ALLOW_REFRESH_TOKEN_AUTH',
	'ALLOW_USER_AUTH'
];
  1. Clone the Amplify Flutter repo and bootstrap it as defined in our CONTRIBUTING.md.
  2. Check out the feat/passwordless-preview branch.
  3. Override your app's dependency with your local copy of Amplify Flutter by adding the attached pubspec_overrides.yaml to your projects root folder. Please replace the [PATH_TO_REPO] placeholder with the path you clone Amplify Flutter.
  4. Test your app out

I'm able to Signup without a password:

final signUpResult = await Amplify.Auth.signUp(
  username: username, //My backend is configured to use emails for usernames
);

final confirmSignUpResult = await Amplify.Auth.confirmSignUp(
  username: username,
  confirmationCode: 'Code Received In Email',
);

and sign in without a password:

final signInResult = await Amplify.Auth.signIn(
  username: username,
  options: const SignInOptions(
    pluginOptions: CognitoSignInPluginOptions(
      authFlowType: AuthenticationFlowType.userAuth,
    ),
  ),
);

final confirmFirstFactorResult = await Amplify.Auth.confirmSignIn(
  confirmationValue: AuthFactorType.emailOtp.value, //signInResult.nextStep.availableFactors lists the options
);

final confirmSignInResult = await Amplify.Auth.confirmSignIn(
  confirmationValue: 'Code Received In Email',
);

Please let me know if you have any questions. Here is the Amplify Android documentation with additional examples. As a reminder WenAuthN is disabled to this phase of the relese.

tyllark avatar Sep 30 '25 11:09 tyllark

@tyllark just to double confirm that the feature works for both Android and iOS ?

Also, do we have any know issues as of now ?

amankachhal99 avatar Sep 30 '25 13:09 amankachhal99

@amankachhal99 It should work on both iOS and Android.

harsh62 avatar Sep 30 '25 15:09 harsh62

I am getting the following error when trying to run the password-preview fork

Launching lib/main.dart on Linux in debug mode...
ERROR: No file or variants found for asset: packages/amplify_secure_storage_dart/lib/src/worker/workers.min.js.
ERROR: Target debug_bundle_linux-x64_assets failed: Exception: Failed to bundle asset files.
Building Linux application...                                           
Error: Build process failed

r0wdiggity avatar Oct 17 '25 18:10 r0wdiggity

Hello @r0wdiggity, are you getting any errors when you run aft bootstrap as per the CONTRIBUTING.md?

This command will run build_runner on our packages which will trigger build_web_compilers to generate the workers.min.js file and then our WorkerCopyBuilder should copy it to the correct asset position.

tyllark avatar Oct 17 '25 21:10 tyllark

When are we planning for release of this ?

amankachhal99 avatar Oct 27 '25 01:10 amankachhal99

Hello @amankachhal99, we are waiting for final approvals from a different team before we can merge the changes. I'll ask them for an ETA and get back to you, but once everything is approved we will merge and release.

tyllark avatar Oct 27 '25 18:10 tyllark

Hi @amankachhal99, I was given an estimate of ~2 weeks until the review is started. I'll provide an update here once the changes are merged in. Thank you for your patience, I know this feature has been delayed too many times and I apologize for the inconvenience.

tyllark avatar Oct 29 '25 23:10 tyllark

Hi @tyllark , Yes we have been pending a major user onboarding revamp just because of this feature.

Thanks for your follow ups and dev efforts.

amankachhal99 avatar Oct 30 '25 01:10 amankachhal99

Hi @tyllark , It has already been 3 weeks, any expected release window visible ?

amankachhal99 avatar Nov 15 '25 04:11 amankachhal99

Hi @amankachhal99, I'm actively following up with the review team. They're currently prioritizing re:Invent tasks, but I'm working to get a concrete timeline for when we can merge and release after that. I'll provide an update here as soon as I have more information. Thanks for your patience.

tyllark avatar Nov 17 '25 07:11 tyllark