You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my application, I have call functionality. I use IoT subscribe events to get the current status, and for authentication, we are using Amplify. When I try to connect to my IoT endpoint using the mqttClient.connect() method, I am able to connect. The app works fine, but when I kill my app and reopen it, I get an error message saying You are currently signed out. I didn't sign out, but still, this error occurs. If I remove the mqttClient.connect() code and follow the same steps, the app works fine. I don't understand why the user is signed out when I connect to my IoT endpoints using mqttClient.connect().
To Reproduce
Steps:
Sign in using Amplify.
Retrieve the authentication session and attributes on the Home screen.
Attempt to connect to IoT endpoints using mqttClient.connect().
After a successful connection, attempt to retrieve the authentication session data using Amplify.Auth.fetchAuthSession - it should work fine, and you will find authSession.isSignedIn to be true.
The app functions properly while in the foreground. However, if the app is killed and removed from the background,
When reopening the app, attempt to retrieve the auth session data using Amplify.Auth.fetchAuthSession will result in authSession.isSignedIn being false.
Because you are using Amplify v2, you will need to implement your own credentials provider (example provided on the page) for IoT. AWS Android SDK's providers interfere with Amplify v2 and wipe its credentials on the device.
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
Bug Description
To Reproduce
Steps:
Code for fetching AuthSession
Code for connect to IoT Endpoints and subscribe topic.
Which AWS service(s) are affected?
Expected behavior
If I don't sign out, I should stay signed in until the token expires or I manually sign out.
Environment Information (please complete the following information):
The text was updated successfully, but these errors were encountered: