amazon_cognito_identity_dart_2
4.0.1, released 3 months ago by an unverified publisher
Unofficial Amazon Cognito Identity Provider SDK for Dart and Flutter apps.
What it does
Provides an unofficial client library for Amazon Cognito Identity to handle user sign-up, sign-in, sessions, and MFA in Dart and Flutter applications. It is based on amazon-cognito-identity-js.
AI-written summary of version 4.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to authenticate users using AWS Cognito in a Flutter or Dart app.
- You want an alternative to Amplify Flutter specifically for Cognito Identity management.
Skip it when
- You prefer using official and fully supported AWS plugins like Amplify Flutter.
- Your project does not use Amazon Cognito as an identity provider.
Strengths
- Supports a wide range of Cognito features including MFA, custom challenges, and refresh token rotation.
- Works across multiple platforms including Android, iOS, Web, Windows, macOS, and Linux.
Weaknesses
- It is an unofficial SDK, meaning it might lag behind official AWS updates.
- Official AWS support recommends using Amplify Flutter instead.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
Requires setting up an AWS Cognito User Pool and Client ID, then initializing the CognitoUserPool object.
import 'package:amazon_cognito_identity_dart_2/cognito.dart';
final userPool = CognitoUserPool(
'ap-southeast-1_xxxxxxxxx',
'xxxxxxxxxxxxxxxxxxxxxxxxxx',
);
final userAttributes = [
AttributeArg(name: 'first_name', value: 'Jimmy'),
AttributeArg(name: 'last_name', value: 'Wong'),
];
try {
var data = await userPool.signUp(
'email@inspire.my',
'Password001',
userAttributes: userAttributes,
);
} catch (e) {
print(e);
}Alternatives
Packages that do the same job and could replace amazon_cognito_identity_dart_2.
- firebase_auth
Choose if you are using Firebase as your backend instead of AWS Cognito.
99Compare
Works with
Packages commonly used together with amazon_cognito_identity_dart_2: ones it builds on, ones built on it, and its own family.
- cryptoamazon_cognito_identity_dart_2 depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- convertamazon_cognito_identity_dart_2 depends on itEncoders and decoders for converting between different data representations.
- aws_s3_upload_liteBuilt on amazon_cognito_identity_dart_2Upload files and byte data directly to AWS S3 buckets with progress tracking.