Want to login with AWS Cognito without using native SDK? You can try the amazon_cognito_identity_dart package which is written purely in Dart.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import 'package:amazon_cognito_identity_dart/cognito.dart'; final userPool = new CognitoUserPool( 'ap-southeast-1_xxxxxxxxx', 'xxxxxxxxxxxxxxxxxxxxxxxxxx'); final cognitoUser = new CognitoUser( final authDetails = new AuthenticationDetails( CognitoUserSession session; try { session = await cognitoUser.authenticateUser(authDetails); } on CognitoUserException catch (e) { // handle CognitoUser exceptions } catch (e) { print(e); } print(session.isValid()); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.