FirebaseAuth on Wear OS

1,164 views
Skip to first unread message

Jolan Rensen

unread,
Oct 30, 2019, 7:40:25 AM10/30/19
to Firebase Google Group
I'm astounded that FirebaseAuth still doesn't work on Wear OS, with people having reported it way back in 2016.

I use a Firestore database that I would like to access from the watch, as to make my app work standalone. However, while I can create a Google login, I cannot convince FirebaseAuth that the user is logged in. This means that I can only access the database if I turn off the check "request.auth.uid != null", which of course would be a huge security flaw.

Trying to use FirebaseAuth.getInstance().signInWithCredential() or .signInWithCustomToken() does not work, as I get the error message "E/GmsClient: unable to connect to service: com.google.firebase.auth.api.gms.service.START on com.google.android.gms".

Has anyone found a solution for this or does someone at Firebase need to solve this?

Sam Stern

unread,
Oct 30, 2019, 9:57:00 AM10/30/19
to Firebase Google Group
Hi Jolan,

Like many other APIs, Firebase Auth depends on Google Play services.  There is a workaround if you're willing to do some extra work, and we have a sample that shows how to get started:

- Sam

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/7c338d4f-5d65-42b1-9a0c-1d1c5af15209%40googlegroups.com.

Jolan Rensen

unread,
Oct 30, 2019, 7:55:54 PM10/30/19
to Firebase Google Group
Hi!
Thanks for sending me the github link! It's really useful, however I cannot get it to work completely.
I added support for signInWithCredential using the same method as signInAnonymously, however, while the data I use works perfectly using a curl command, I get this from the github code:
errors: {
      "error": {
        "code": 400,
        "message": "MISSING_REQUEST_URI",
        "errors": [
          {
            "message": "MISSING_REQUEST_URI",
            "domain": "global",
            "reason": "invalid"
          }
        ]
      }
    }

I don't need a request Uri (or do I?), and if I do give one like "http://localhost" (which again works fine with curl) or "https://google.com", I still get the same error. This makes me unsure whether the arguments work at all (and requestUri is simply the first one getting checked) or I simply need a valid Uri.

Thanks in advance!
Jolan



On Wednesday, October 30, 2019 at 2:57:00 PM UTC+1, Samuel Stern wrote:
Hi Jolan,

Like many other APIs, Firebase Auth depends on Google Play services.  There is a workaround if you're willing to do some extra work, and we have a sample that shows how to get started:

- Sam

On Wed, Oct 30, 2019, 4:40 AM Jolan Rensen <jolan...@gmail.com> wrote:
I'm astounded that FirebaseAuth still doesn't work on Wear OS, with people having reported it way back in 2016.

I use a Firestore database that I would like to access from the watch, as to make my app work standalone. However, while I can create a Google login, I cannot convince FirebaseAuth that the user is logged in. This means that I can only access the database if I turn off the check "request.auth.uid != null", which of course would be a huge security flaw.

Trying to use FirebaseAuth.getInstance().signInWithCredential() or .signInWithCustomToken() does not work, as I get the error message "E/GmsClient: unable to connect to service: com.google.firebase.auth.api.gms.service.START on com.google.android.gms".

Has anyone found a solution for this or does someone at Firebase need to solve this?

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fireba...@googlegroups.com.
Message has been deleted

Sam Stern

unread,
Oct 31, 2019, 2:47:00 PM10/31/19
to Firebase Google Group
Hmmm I am actually not sure what that error means.  Can you show the full REST request you're sending with all the arguments?

- Sam

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/1a58d264-1621-47d8-8700-46f95469dd40%40googlegroups.com.

Jolan Rensen

unread,
Oct 31, 2019, 9:06:40 PM10/31/19
to Firebase Google Group
Alright, I solved that last thing, human error on my side: I mistyped "returnSecureToken" as "requestSecureToken"...
Well the good news is that it's working now! I can use a Google Login for Firebase Firestore on Wear OS!
Thanks for the help :)

Sam Stern

unread,
Oct 31, 2019, 9:17:55 PM10/31/19
to Firebase Google Group
Glad to hear it!  That's pretty cool.  

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/2b5d986a-58da-4f40-b95b-655f9689590c%40googlegroups.com.

Dan I

unread,
Dec 7, 2019, 1:40:55 PM12/7/19
to Firebase Google Group
Hi, I am facing same issue, could you please share related code. That would be of great help.

Jolan Rensen

unread,
Dec 8, 2019, 10:56:48 AM12/8/19
to Firebase Google Group
Sure! I'm planning to make a fork of the git mentioned above and put my changes in there. Will probably be there in the next couple of days, I'll let you know.

Jolan Rensen

unread,
Dec 9, 2019, 10:47:05 AM12/9/19
to Firebase Google Group
Hi Dan,
I pushed my changes to a fork found here:
https://github.com/Jolanrensen/auth-without-play-services

I updated the readme to help you find what you're looking for.
Reply all
Reply to author
Forward
0 new messages