We have a React-Native application that uses AWS Amplify to authenticate the users in the Amazon Cognito User Pools. We have configured the User Pool as well as the Identity Pool information with AWS Amplify in the React-Native app. The authentication flow works as desired in the React-Native application and we are receiving 'id_token', 'access_token' as well as the 'refresh_token' on sign in.
However, our React-Native application also invokes an Android library through a bridge that we have coded in Java. We are able to send tokens to the Android library from the React Native application but cannot figure out how to use the 'refresh-token' in Android to keep the session going. Can we use the AWSMobileClient in Android to utilise the tokens to keep the session going?
This is the site we referred to for the Android AWS Amplify session maintenance: https://aws-amplify.github.io/docs/android/authentication (For Android)
https://aws-amplify.github.io/docs/js/start?ref=amplify-rn-btn&platform=react-native (For React-Native)