Flutter support for Amazon LWA (Login with Amazon), used by the Zuma companion app to link an Amazon account for Alexa.
The API is login(), logout(), getAccessToken() and getAuthCode()
(the last for the Alexa alexa:all code-challenge flow).
Android only in practice - the iOS side is a stub that answers every method with the iOS version.
The native side wraps Amazon's LWA SDK, checked in as
android/login-with-amazon-sdk.jar (currently 3.1.6).
To update it, download the SDK from
https://developer.amazon.com/docs/login-with-amazon/install-sdk-android.html
and copy samples/SampleLoginWithAmazonApp/libs/login-with-amazon-sdk.jar
over the checked-in jar. The downloads themselves are gitignored, so
unpack them wherever is convenient.
The consuming app needs an api_key.txt in its Android assets, generated
from the signing certificate registered against the LWA security profile.
The Zuma app carries one per signing config. Login fails at runtime
without a key matching the certificate the APK was signed with.
example/ drives login, the alexa:all scope and the code-challenge
flow by hand. The product ID, device model and serial number in it are
placeholders and need replacing with real values to get past Amazon's
checks.