I am able to Sign In, using custom authentication using the Amplify API, but in logs it is showing me an Identity Pool error, when I try to fetch the session.
I am getting an Identity Pool error saying: cause=SessionError(exception=ConfigurationException{message=Identity Pool not configured., cause=null, recoverySuggestion=Please check amplifyconfiguration.json file.}
This error can be seen on running:
fun checkUserExistsHandler() {
Amplify.Auth.fetchAuthSession(
{ result: AuthSession ->
Log.i(
"AmplifyFetchAuthSession",
result.toString()
)
}
) { error: AuthException ->
Log.e(
"AmplifyFetchAuthSession",
error.toString()
)
}
}
Here is my amplifyconfiguration.json I am using CUSTOM_AUTH method for signing in.
{
"auth": {
"plugins": {
"awsCognitoAuthPlugin": {
"IdentityManager": {
"Default": {}
},
"CognitoUserPool": {
"Default": {
"PoolId": "pool-id",
"AppClientId": "client-id",
"Region": "Region"
}
},
"Auth": {
"Default": {
"authenticationFlowType": "CUSTOM_AUTH"
}
}
}
}
}
}```
Even after sign in is successful the Log is shown as
AWSCognitoAuthSession(isSignedIn=true, identityIdResult=AuthSessionResult{value=null, error=ConfigurationException{message=Could not retrieve Identity ID, cause=null, recoverySuggestion=Cognito Identity not configured. Please check amplifyconfiguration.json file.}, type=FAILURE}, awsCredentialsResult=..... ```
What changes should I make, to resolve the error ?