Reliable Way to Refresh STS Credentials for Browser MQTT Connection #572
Unanswered
prabh-netomi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have a browser-based real-time application using AWS STS on the server side to provide temporary credentials to the client.
Credentials got expired in 15 mins so we initiate the credentials refresh at 12 minutes, but when I refresh them there’s no way to provide the new credentials to the existing client.
I have to disconnect the old connection and create a new one, which causes a short downtime — if any message is published during this time, it gets missed and causes issues in our app.
I also noticed that sometimes when a user’s connection is interrupted, the SDK gets stuck in a interrupt -> resume loop. Logs keep printing, but no new messages are received until we manually disconnect and reconnect.
In SDK v1, updateWebSocketCredentials handled this automatically and we didn’t have to manually disconnect and reconnect for credentials refresh. Auto-reconnect worked fine.
But SDK v2 seems to lack this feature, and I’ve seen other people report similar reconnection issues.
What’s the recommended way in SDK v2 to:
Any guidance or best practices would be highly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions