amplify-android: Amplify.Auth.fetchAuthSession returns "You are currrently signed out." immediately after successful Amplify.Auth.signIn call
I’m trying to get a basic Android app setup with Amplify Auth, using existing user and application pools that are already working on our iOS side. But I’m seeing an issue after a user is successfully authenticated with USER_PASSWORD_AUTH. Subscribing to the Hub event, I’m able to see the SIGNED_IN event, and no SIGNED_OUT or SESSION_EXPIRED events occur. Amplify configuration succeeds, and logging in the (existing) user returns with the following:
AuthSignInResult{isSignInComplete=true, nextStep=AuthNextSignInStep{signInStep=DONE, additionalInfo={}, codeDeliveryDetails=null}}
Immediately afterwards, I attempt to fetch the Auth session, but get the following:
AWSCognitoAuthSession{isSignedIn=false, awsCredentials=AuthSessionResult{value=null, error=AmplifyException {message=You are currently signed out., cause=null, recoverySuggestion=Please sign in and reattempt the operation.}, type=FAILURE}, userSub=‘AuthSessionResult{value=null, error=AmplifyException {message=You are currently signed out., cause=null, recoverySuggestion=Please sign in and reattempt the operation.}, type=FAILURE}’, identityId=‘AuthSessionResult{value=null, error=AmplifyException {message=You are currently signed out., cause=null, recoverySuggestion=Please sign in and reattempt the operation.}, type=FAILURE}’, userPoolTokens=‘AuthSessionResult{value=null, error=AmplifyException {message=You are currently signed out., cause=null, recoverySuggestion=Please sign in and reattempt the operation.}, type=FAILURE}’}
Here’s the code in question:

and my (edited for privacy) amplifyconfiguration.json file:

About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 25 (6 by maintainers)
This was my issue. May be this will help someone.
Nevermind, all is good!