Search code examples
flutterflutter-webbrowser-security

Authentication with web based flutter app


I want to build a flutter app where people can log in and post things for other users to see. I want this app to be accessible in a browser and thought I could use Flutter-Web.

I can run the flutter app on a server with a local database but the issue is that if one user accesses the page and logs in, then everybody else is also logged in as that user.

The only solution I can see is if everybody would download my flutter app to their local machine, start an instance and then all those instances communicate with a remote database.

I can use a remote database, although I don't like it, but I don't want people to install anything.

Is there a way around by serving multiple flutter instances, one for each browser session?


Solution

  • The library flutter-auth-ui provides UI for Firebase authentication.

    See how it works here.