Cognito Passwordless
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!
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!
Hi @ekjotmultani Thank you for the update!
In the meantime, are any workarounds available to support passwordless sign-in using the existing APIs? Thanks!
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!
Is this released yet ?
@amankachhal99 The team is currently working on supporting this on Flutter, we will post an update on the issue once this is done.
@harsh62 .. thanks for reply.
Any timeline for release? Insight in this week help us to plan our tasks.
@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.
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.. 👍
Just adding 👍 that I would love to see this ASAP
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.
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. 🫰
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!
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,
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.
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. :(
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.
Ok Waiting.
Hello @amankachhal99, Here are the steps for how you can test the Passwordless changes in your app:
- Enable Passwordless in Cognito, I did this by updating my
amplify/backend.tsfile 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'
];
- Clone the Amplify Flutter repo and bootstrap it as defined in our CONTRIBUTING.md.
- Check out the
feat/passwordless-previewbranch. - 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. - 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 just to double confirm that the feature works for both Android and iOS ?
Also, do we have any know issues as of now ?
@amankachhal99 It should work on both iOS and Android.
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
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.
When are we planning for release of this ?
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.
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.
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.
Hi @tyllark , It has already been 3 weeks, any expected release window visible ?
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.