Search code examples
firebaseunity-game-enginefacebook-c#-sdkunity-webgl

Firebase get auth token through REST?


I'm trying to integrate Firebase into a Unity WebGL app, unlike iOS and Android there's no official Firebase plugin for it.

I'd like to try and use the Unity WWW class to make web requests to endpoints to do firebase authentication.

Is there an endpoint I can call passing the username and password to firebase that will return an auth token?


Solution

  • No, that would be a massive security hole for the end user who gives up their password to you. Users should only be typing passwords directly into the site that controls their account.

    You should probably take a look into calling through to JavaScript to use the Firebase web SDKs.

    WebGL: Interacting with browser scripting