Trying to move to Firebase and I have a need to use the Google Authentication token (not the Firebase token from GetUserTokenId) I see the properties in the Firebase Java API Doc and figured I could use the javaobject method to retrieve the value. I am trying this code:
B4X:
Sub Auth_SignedIn (User As FirebaseUser)
Dim jo As JavaObject
jo.InitializeStatic("com.firebase.client.AuthData")
Dim gtoken As String
gtoken = jo.RunMethod("getToken",Null)
log(gtoken)
After being successfully logged in with the firebase auth library (just like in the example), with the Google authentication method enabled in the dashboard, I then need to use the Google oauth token, which is stored in the firebase auth class, but is not exposed by the b4x library.
The GetUserTokenId() provides a "firebase" token, which is not what I need. I require the underlying google oauth token which is a different value. I need the Google oath token specifically to a external service which uses this value to validate against google oauth directly (not against firebase).
The GetUserTokenId() provides a "firebase" token, which is not what I need. I require the underlying google oauth token which is a different value. I need the Google oath token specifically to a external service which uses this value to validate against google oauth directly (not against firebase).