user3030327
user3030327

Reputation: 451

is it possible to use firebase admin SDK in flutter web apps?

I am using flutter web and firebase authentication. I want to use firebase admin SDK to manage users from my flutter web application. Is it possible to use firebase admin SDK in flutter web apps. please let me know is it possible or not. If possible please let me know the previous example links or some information. I have searched on internet but I did not get the information.

Upvotes: 1

Views: 749

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 599061

From the Firebase documentation on Adding Firebase to your server:

Add the Firebase Admin SDK to your server

The Admin SDK is a set of server libraries that lets you interact with Firebase from privileged environments to perform actions like:

...

As said, the Admin SDKs are designed to be used in privileged environment, since using them gives you full administrative control to your Firebase project. Using it in another context would be a huge security risk, so is not possible.

If you need certain functionality from the Admin SDK in your web app, you can:

  • Use the Admin SDK in a trusted environment, such as your development machine, a server that you control, or Cloud Functions, to implement that functionality.
  • Then wrap that code in a custom API that you can call from your client-side code. If you've never done this before, Cloud Functions again provides a good starting point.
  • In your server-side code, ensure that only authorized users can invoke it.

Upvotes: 1

Related Questions