Open HappyMakadiyaS opened 1 year ago
Hi @HappyMakadiyaS - with the autoSignIn feature, OTP codes still need to be entered into confirmSignUp
and confirmSignIn
. The feature simply prevents having to call signIn
after signUp
.
Does that align with your use case? If not, can you explain in more detail what you'd like to see from this feature?
Having this feature in amplify-js library but not in amplify-flutter creates a mismatch of implementations on Cognito lambda triggers if you have both clients. It would be great to have this feature
Has this been implemented? I also would like to know if autoSignIn can be done the user signs up. My sign up flow is passwordless which means user will be signed in if they put in the correct otp.
await Amplify.Auth.signUp(
username: user.phoneNumber,
password: 'bol_$user.phoneNumber',
options: SignUpOptions(
userAttributes: userAttributes,
),
);
This feature is still unimplemented in the Amplify Flutter libraries and I do not have an estimate on when it may be worked on. I apologize for the mismatch this creates between the Flutter and JS libraries.
This feature would be very helpful since now we ask a user to sign up and force them to sign in immediately after. It feels like a broken workflow, to be honest.
This actually creates a significant issue for us as calling signin again forces the user through a second OTP.
@dnys1 Can we get a ETA? This is impacting sign ups for our app.
Totally agree +1
We still do not have an estimate on when this will be implemented. However, I wanted to note a few ways that this could be achieved today.
The Authenticator UI component does perform auto sign in. I would encourage folks to see if the Authenticator meets their needs. If you find that the Authenticator UI component does not fit your use case please feel free to share that feedback so that we can look to improve it.
Aside from the Authenticator component, this can be implemented without having the customer fill out two forms. Both the JS lib and the Authenticator component achieve auto sign in by temporarily holding the sign up data in memory, so that the signIn API can be called immediately after signUp/confirmSignUp without the user having to take any action. This same method can be implemented within your app.
@sumchans - How are you implementing passwordless login? There are a couple ways that it can be achieved today. It doesn't appear that you are using Cognito's custom auth. Are you using MFA as a workaround?
I think the methods I mentioned above would likely apply to your use case as well, although I would need to know a little bit more about how you implemented passwordless to say for sure.
We still do not have an estimate on when this will be implemented. However, I wanted to note a few ways that this could be achieved today.
The Authenticator UI component does perform auto sign in. I would encourage folks to see if the Authenticator meets their needs. If you find that the Authenticator UI component does not fit your use case please feel free to share that feedback so that we can look to improve it.
Aside from the Authenticator component, this can be implemented without having the customer fill out two forms. Both the JS lib and the Authenticator component achieve auto sign in by temporarily holding the sign up data in memory, so that the signIn API can be called immediately after signUp/confirmSignUp without the user having to take any action. This same method can be implemented within your app.
@Jordan-Nelson Thanks for your reply, we unfortunately require a OTP to be sent with SignIn wouldn't calling the signin API immediately following signUp/confirmSignUp trigger this as well?
Thanks again.
@bookofdom - Yes it would. I don't think this is a use case covered by the JS library or the flutter Authenticator. Both would automatically call signIn, but the user would then have to enter the OTP code.
I am not sure if there is any way avoid entering the OTP. Sign In and Sign Up are two distinct operation in Cognito. I would need to do some investigation to see if there is any way to work around that. We can note that as a requirement but I think the initial iteration of this would likely not cover that use case.
@maziarzamani - Let us know if you have a similar requirement, or if there is any other reason the approach of calling signIn after signUp would not work for your use case. Thanks.
@sumchans - How are you implementing passwordless login? There are a couple ways that it can be achieved today. It doesn't appear that you are using Cognito's custom auth. Are you using MFA as a workaround?
I think the methods I mentioned above would likely apply to your use case as well, although I would need to know a little bit more about how you implemented passwordless to say for sure.
I have done it using MFA. I still need to call Sign in after the signup process which means the user will receive two OTPs one for the sign up and then the sign in. I am still waiting for this to be implemented.
@DogukanZengin - Do you also have MFA enabled and are looking to prevent the user from having to enter a confirmation code during sign up and sign in?
Since it sounds like the majority of folks are looking to prevent end users from entering multiple confirmation codes during the sign up and initial sign in flow, I have updated the issue description and title to reflect that.
As I mentioned in a previous comment, the auto sign in API from Amplify JS does not resolve this. The end user would still be required to enter a confirmation code for sign up AND sign in. However, if you are looking for this to be supported in Amplify Flutter, please feel free to open a new feature request. Please include your use case in the request so that we can ensure the API would solve for it.
@maziarzamani - Let us know if you have a similar requirement, or if there is any other reason the approach of calling signIn after signUp would not work for your use case. Thanks
When creating a new user account calling signup already sends an OTP. The SignUp call does not log you in. So calling SignIn right after SignUp makes you re verity with the OTP. This is an awkward flow. I would recommend having SignUp log a user in also.
Can you provide me with an update regarding this feature? Many developers are eagerly anticipating its release. For instance, Tinder uses passwordless sign-up, when a user signs up he gets a confirmation code, and when signup is confirmed the user will be automatically signed in without the need to do the OTP confirmation twice. it's better for the user experience and also saves costs
I have used Firebase, which also supports this feature.
Updated Description
When MFA is enabled, or a custom auth flow is used that sends OTP, the user is forced to enter multiple confirmation codes in order to sign up and then subsequently sign in. Ideally they should not have to enter codes multiple times in a row.
Note: Previously this FR mentioned auto sign in in Amplify JS. Since the auto sign in feature in Amplify JS does not solve for this use case, we will track this request separately.
Original Description