Comments (7)
@JorgeAndresDiazz thanks for taking the time to raise this issue. we will look into this and get back to you.
from amplify-flutter.
Thank you @NikaHsn. For additional information, please take into account that the exception occurs even though
new password request (2nd custom challenge "NEW_PASSWORD_REQUIRED") is requested first (before OTP CUSTOM CHALLENGE). I mean, if the following code is the only challenge the login flow has:
// NEW PASSWORD REQUIRED
final isSetNewPassword = otpChallengeResult.nextStep.signInStep ==
AuthSignInStep.confirmSignInWithNewPassword;
if (isSetNewPassword) {
const newPassword = 'abc1234'; // This is gotten from the user
final newPasswordResult = await Amplify.Auth.confirmSignIn(
confirmationValue: newPassword,
);
I still get the same exception (NotAuthorizedServiceException "message": "Invalid session provided for the user.") when calling await Amplify.Auth.confirmSignIn.
I could replicate the same issue after using Amplify Authenticator package as well (https://ui.docs.amplify.aws/flutter/connected-components/authenticator ). I evaluated AuthenticatorStep.confirmSignInNewPassword and called state.confirmSignInNewPassword() method, which threw the exception
from amplify-flutter.
@JorgeAndresDiazz thank you for providing these details. we will look into this issue and get back to you with any updates.
from amplify-flutter.
Hi @NikaHsn. Do we have any news regarding this issue?
from amplify-flutter.
Hi @JorgeAndresDiazz - I believe in response to AuthSignInStep.confirmSignInWithNewPassword
you should invoke Amplify.Auth.confirmResetPassword()
with the confirmation code that was sent to the user along with the new password and username.
I think this is a mistake in the documentation. Can you try Amplify.Auth.confirmResetPassword()
and let me know if you face any issues?
from amplify-flutter.
Hey @Jordan-Nelson, thank you for replying
It's not possible to use Amplify.Auth.confirmResetPassword(...)
since it expects a required String confirmationCode
, which it's a value we don't have. Please take into account that for the OTP custom challenge (previous challenge from AuthSignInStep.confirmSignInWithNewPassword
) we use a custom OTP generator in our lambda trigger, which I think does not relate to the confirmationCode expected by the Amplitude SDK
from amplify-flutter.
@JorgeAndresDiazz Thanks for the additional info. In the SRP sign in flow Cognito will send a confirmation code which the end user can input for use in confirmResetPassword()
. This may not be the case with custom auth. I have reached out to Cognito to see what the expected response should be when using custom auth. I will let you know what I find.
from amplify-flutter.
Related Issues (20)
- Amplify.Hub.listen never get "ready" HOT 6
- correctClockSkew option HOT 1
- Amplify.API.mutate HOT 9
- Customize title of Authentication with Amplify flutter Authentication UI HOT 3
- Network error when trying to authenticate from a release apk HOT 5
- How to use SyncExpression with GroupPredicate HOT 3
- Gen2 - Quick Start guide does not work - ConfigurationError: The provided configuration is not a valid json HOT 3
- Build failed with an exception
- Error message is unclear when oauth is missing from config HOT 3
- [iOS] building with debug flag makes the app crash HOT 3
- aws_signature_v4 - flutter and aws lex bot integration HOT 3
- Data not updated by API GraphQL HOT 3
- Feature Request: GraphQL query with sorting by date with secondary index HOT 5
- DataStore initial sync slower after recreating auth and schema has owner-based permissions HOT 6
- amplify_auth_cognito:compileDebugJavaWithJavac HOT 9
- Datastore query returns empty list even when isSynced: true in observeQuery snapshot. HOT 2
- [aws_common] update the "js" version in pubspec HOT 2
- a.customType({}) modelgen issue - Single-Table-Design flutter Amplify-gen2 HOT 2
- feature request: Emit info from signInWithWebUI through Auth Hub HOT 8
- Amplify.configure() incorrectly throws JSON parsing validation error on valid JSON string HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplify-flutter.