v1.0.0
We are thrilled to release version 1.0 of the Amplify Flutter libraries!
This release introduces a full rewrite of the Amplify libraries in Dart, allowing you to build AWS cloud-connected applications on every platform Flutter supports (iOS, Android, Web, macOS, Windows, and Linux).
If you've been using v0 in production, you can now safely migrate to v1. Check out our migration guide for more information.
New Features
Analytics Category
- You can now save to the
UserAttributes
field of a Pinpoint Endpoint by passing anAWSPinpointUserProfile
toAmplify.Analytics.identifyUser
. - The
autoFlushEventsInterval
in Analytics config can now be set in seconds to control how often cached events are auto-flushed. Beforehand, this value was inconsistently read as seconds on iOS and milliseconds on Android.
API Category
GraphQLRequest
now has anauthorizationMode
property so callers can specify the authorization mode directly.GraphQLRequest
now has aheaders
property to specify HTTP headers.- GraphQL subscriptions will automatically reconnect when losing internet, or when changing from Wi-fi to cellular data or vice versa.
- GraphQL model helpers now support custom primary keys.
- GraphQL subscription model helpers (
ModelSubscriptions
) now support awhere
clause to use server-side subscription filters via model helpers.
Auth Category
fetchAuthSession
now supports aforceRefresh
parameter which, when passed, will refresh User Pool tokens and AWS credentials regardless if they’ve expired.- The result of
Amplify.Auth.signUp
now provides the user ID of the created user. Previously this was only available after signing in. - Custom OAuth providers are now configurable when signing in via Hosted UI.
- A new
federateToIdentityPool
API has been added to the Cognito plugin which allows federating directly into an Identity Pool to receive AWS credentials using a third-party identity provider (IdP) token.- Note: Since this method is only available on the Cognito plugin, it must be called directly on the plugin. The Cognito plugin can be retrieved by calling
Amplify.Auth.getPlugin(AmplifyAuthCognito.pluginKey)
anytime after configuration. - This method prevents usage of any User Pool-related methods. It should only be used in scenarios where you need AWS credentials and already have a mechanism for retrieving OIDC tokens from a third-party IdP.
- Note: Since this method is only available on the Cognito plugin, it must be called directly on the plugin. The Cognito plugin can be retrieved by calling
Storage Category
- In-flight download and upload operations are now fully controllable.
- NOTE: Downloading and uploading in the background is not yet supported.
- The
list
API now supports pagination. - The new APIs
uploadData
anddownloadData
provide flexibility when dealing with data stored in memory.uploadData
supports uploading from various data formats such as raw bytes, JSON, strings, Data URLs, and more.
- The new API
getProperties
allows retrieving S3 object metadata without downloading the object. - New
copy
,move
, andremoveMany
APIs now support better control of your files. - Prefix customization is now supported.
Bug Fixes
API Category
The following issues have been fixed in this release:
- Custom primary key support (#1426)
- api Model helpers should not pass null fields (#2492)
- Authentication Type For Api (#1557)
- Adding Headers to Outgoing Requests (#1217)
- Custom HTTP Interceptors (#798)
- Cannot perform DELETE action with body from android device (#1569)
Auth Category
The following issues have been fixed in this release:
- Users getting session expired right after sign in (#1271)
- Inconsistent/Incorrect behavior when fetching auth session without internet access (#760)
- Amplify.Auth.updateUserAttribute crashes app (#2361)
- Support user migration lambda function trigger & USER_PASSWORD authentication type (#442)
- Custom Auth Flow with passwordless login (#2393)
- Error while getting the getCurrentUser if mobile is connected to network without internet (#2292)
- NotAuthorizedException exception message are different on android and iOS (#2231)
- AuthException/CustomTabsNotSupportedException when default browser does not support custom tabs (#1830)
- Auth Fetch Auth Session fail after relogin (#1438)
- Not getting lamda exceptions for social login (#1279)
- Username from Auth.getCurrentUser has inconsistent casing on iOS and Android (#723)
- UpdateUserAttributeResult.isUpdated is true on Android but false on iOS if the attribute requires confirmation (#609)
- Generic AuthException is thrown when the device does not have chrome installed (#587)
- isSignUpComplete returns True in android even if the user has not been confirmed. In iOS it doesn't. (#581)
- Username is cached for use in confirmPassword on Android (#464)
- Remove browser redirection after signOut() in app using social sign in (#401)
- Force token refresh (#299)
- Amplify.Auth.getCurrentUser() return different platform results when using email based auth (#201)
Storage Category
The following issues have been fixed in this release:
- When amplify storage upload start, we see an allow push notifications dialog on Android (#2643)
- Inconsistent Network Timeout between iOS and Android (#774)
- S3 bucket only returning 1000 files (#991)
- Returned value from Storage.downloadFile function do not resolve when is called with a expired session (#926)
DataStore Notes
When interacting with GraphQL APIs, use the API category for all platforms or DataStore for iOS and Android. This is because we retained DataStore on the original Android & iOS implementation. We’re looking to bring data synchronization and offline data experiences to the web and desktop in the future and would love to get your feedback on this GitHub issue.