0

I want to set up actions on the google home console so the user can fetch data about their account from the google home.

Currently, I have a mobile app that uses the Firebase Auth to authenticate my users by having them sign in (via email/password, google, facebook) and then using the Firebase ID token associated with that user, I reach out to Firebase to check if this user exists and who it is, to make calls to my endpoints.

I have read several questions regarding this on stack overflow similar to this. However, they say to use my own separate OAuth flow. The issue with this as said above is that the way I authenticate my user is by using the Firebase ID token from the sign-in firebase user and then using their UID to know who they are and to return the correct information.

Is there really no way to use Firebase Auth through the google home?

If not, how am I suppose to authenticate my users through a separate OAuth because I use the UID from Firebase which is the means of identifying my users?

Is there something I am just not understanding?

1 Answers1

0

Firebase Auth is a type of client-side authentication. A client authorizes with Firebase with one of several methods, and gets an identity token.

Actions on Google is a server-side platform. As such, it is unable to authenticate directly to Firebase. Firebase Auth is not an OAuth server.

You would be unable to directly use Firebase Auth to authenticate your users. If you were interested, you could try to use Firebase Functions as a way to do the OAuth exchange.

Alternatively, you may want to use a service like Auth0 which is an OAuth service. Similar to Firebase, it provides many authentication services like Email/Password, Google, and Facebook.

If you go with Auth0, you may need to do some extra logic to associate the OAuth ID with your Firebase ID by matching the service and service ID.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35