I am using Login With Amazon iOS SDK to get an authorization token to use later with AVS.
The first time (on the app start) I call the AMZNAuthorizationManager method authorize and everything works just fine. The callback block gets called and I get the token that I am able to use with the AVS api. I call the authorize method before any communication with Alexa (e.g. while restarting the downchannel). And every time I get the same cached token, unless...
Issues start after 1 hour when token becomes invalid. Obviously I can't use the old token, because then I get the authorization error. But when I call authorize again (the same code as in previous sucessful attempts), my callback block is not called anymore! I tried to debug the problem and when debugging the network stack I noticed that LWA SDK doesn't even send the authorization request.
After restarting the app, everything works well for one hour again.
The problem occurs on every iOS version I have access to (10.*, 11.*). The app is written in Swift 4.1, but was able to reproduce issue using only obj-c.
PS Is there any other method to get the authorization token? I would prefer raw http request than this uncontrollable sdk ;)