amazon-web-servicesflutterauthenticationamazon-cognitoflutter-web

How to login with cognito in flutter web?


I built a flutter web application and have previously whole backend setup on AWS. So I want to use my existing userpools from cognito in my app. But just got know that AWS amplify for flutter in only supported in android and ios,not for web. Can you suggest me any solution for this?


Solution

  • Try using this package: https://pub.dev/packages/amazon_cognito_identity_dart_2

    I've been using it for a while, and it works fine on Android and Web; I think I even got it working on iOS.

    What Amplify team did with official Flutter package was use a wrapper around existing Android and iOS implementation (by using platform channel). I guess this is a reason it will take them a while to sort out web.

    The above package is based on amplify-js, and re-written in dart, so it will compile on any platform.

    In my project workspace I created two separate projects: one with amplify to create back-end objects, and one flutter project. So, like in your case, my flutter project connects to an existing AWS backed.