-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws-android-sdk-auth-userpools does not support forced change password flow #374
Comments
Hi @akki1997, Thanks for reporting to us. Are you trying to sign-in with the temporary password created by a UserPool Admin? The Amazon Cognito UserPools SDK (aws-sdk-android-cognitoidentityprovider) has the API that lets the user change password for the first time the user signs in. But, the Auth UserPools SDK (aws-sdk-android-auth-userpools), which has the SignIn UI doesn't support the use case, where a user with temporary credentials signs in and requires changing the password. We will take it as a feature request. For more information to signing-in as an admin created user, refer this documentation: http://docs.aws.amazon.com/cognito/latest/developerguide/using-amazon-cognito-user-identity-pools-android-sdk-authenticate-admin-created-user.html |
Yes I was signing in with the temporary password
…On 20-Nov-2017 11:29 PM, "Karthikeyan" ***@***.***> wrote:
Hi @akki1997 <https://github.com/akki1997>,
Thanks for reporting to us. Are you trying to sign-in with the temporary
password created by a UserPool Admin? The Amazon Cognito UserPools SDK
(aws-sdk-android-cognitoidentityprovider) has the API that lets the user
change password for the first time he signs in. But, the Auth UserPools SDK
(aws-sdk-anroid-auth-userpools), which has the SignIn UI doesn't support
the use case, where a user with temporary credentials signs in and requires
changing the password.
We will take it as a feature request.
For more information to signing-in as an admin created user, refer this
documentation: http://docs.aws.amazon.com/cognito/latest/developerguide/
using-amazon-cognito-user-identity-pools-android-sdk-
authenticate-admin-created-user.html
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#374 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANRcuqHh6r92C3LIKSDu8kjegvXcaSTgks5s4b3tgaJpZM4QkUBD>
.
|
Sorry for the inconvenience caused. Currently, the Auth UserPools SDK (aws-sdk-anroid-auth-userpools) with the SignIn UI doesn't support this use-case. We are taking it as a feature request. |
So how to proceed further
…On 21-Nov-2017 12:44 AM, "Karthikeyan" ***@***.***> wrote:
Sorry for the inconvenience caused. Currently, the Auth UserPools SDK
(aws-sdk-anroid-auth-userpools) with the SignIn UI doesn't support this
use-case. We are taking it as a feature request.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#374 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANRcusZB_GvNwZwmVvfSxGlfmTrBTdsCks5s4c-SgaJpZM4QkUBD>
.
|
who can explain how to remove the issue? I get the same error |
Using the latest version, this still happens. What's worse, is that the Cognito android tutorials will eventually lead you here (https://docs.aws.amazon.com/aws-mobile/latest/developerguide/getting-started.html) The primary issue is that the Cognito user pool, when creating a user, defaults to an unchangeable status of "Enabled / FORCE_CHANGE_PASSWORD". If your only endpoint is an Android application, then this will just crash your app every time it happens. @kopevgale because of how this is implemented, it seems impossible to override this behavior. You can, however get around this, buy not using UserPools and moving to OAUTH (which is what I'm about to do). |
Any update, just trying the tutorial myself, got the dreaded What is the fix/workaround ? |
I'm getting the same issue. Please look at fixing this. |
Just tried this different tutorial |
Having the same issue here, Or you found any alternatives for this issue ? |
Still facing the same issue & no workaround has been found. |
OK, so this all fails because the AWSStartupHandler does not have the authenticationChallenge callback implemented. Apparently this is a feature request now. This tells us
As far as I can tell, AuthenticationChallenge is part of the the AuthenticationHandler interface. So i've implemented this as part of my main activity: And then overidden the other API's as well as authenticationChallenge API. However, i still get the same error. Any thoughts on what i'm doing wrong please ? TIA, Ringo |
I'm not sure why this was so hard to figure out but until this feature is fixed, then the guidance on the "welcome to Mobile AWS" (https://docs.aws.amazon.com/aws-mobile/latest/developerguide/add-aws-mobile-user-sign-in.html) should really be changed until this feature is fully implemented. So, for future reference, and for any other poor soal just following instructions only to find out you get here, just take a look at the sample applications here: https://github.com/awslabs/aws-sdk-android-samples There is a great sample called "AmazonCognitoYourUserPoolsDemo" which works. Yes, its a lot more complicated (i.e. its normal), but it works. HTH's.. |
Hi, We are looking into this issue now. |
Hi @akki1997 @kopevgale @Nthalk @danleahy @iamdeadman @pacifire @ringonotts , Please see if SDK release 2.7.6 fixes this issue for you. We have added the following enhancements:
You may see all changes in the changelog |
Hi, We are closing this issue because there has been no activity. Please feel free to open a new issue if the problem persists. We ask this because closed issues are not actively monitored. Thanks |
StackTrace-
FATAL EXCEPTION: main
Process: com.example.aksshita.toll, PID: 4082
java.lang.UnsupportedOperationException: Not supported in this sample.
at com.amazonaws.mobile.auth.userpools.CognitoUserPoolsSignInProvider$6.authenticationChallenge(CognitoUserPoolsSignInProvider.java:331)
at com.amazonaws.mobileconnectors.cognitoidentityprovider.CognitoUser$28.run(CognitoUser.java:2108)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
The text was updated successfully, but these errors were encountered: