Gentry Member Licensed User Longtime User Aug 21, 2016 #1 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: Code: 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) But of course I get Code: java.lang.ClassNotFoundException: com$firebase$client$AuthData I tried to add a reference as #AddditionalJar but I couldn't find a firebase.jar to copy to libraries. Am I barking up the right tree? Thanks, Gentry
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: Code: 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) But of course I get Code: java.lang.ClassNotFoundException: com$firebase$client$AuthData I tried to add a reference as #AddditionalJar but I couldn't find a firebase.jar to copy to libraries. Am I barking up the right tree? Thanks, Gentry
KMatle Expert Licensed User Longtime User Aug 21, 2016 #2 Did you follow this example: https://www.b4x.com/android/forum/threads/firebaseauth-authenticate-your-users.67875/ You don't need a Java method Upvote 0
Did you follow this example: https://www.b4x.com/android/forum/threads/firebaseauth-authenticate-your-users.67875/ You don't need a Java method
Gentry Member Licensed User Longtime User Aug 21, 2016 #3 KMatle said: Did you follow this example: https://www.b4x.com/android/forum/threads/firebaseauth-authenticate-your-users.67875/ You don't need a Java method Click to expand... 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. My need is to retrieve this oauth token value. Upvote 0
KMatle said: Did you follow this example: https://www.b4x.com/android/forum/threads/firebaseauth-authenticate-your-users.67875/ You don't need a Java method Click to expand... 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. My need is to retrieve this oauth token value.
freedom2000 Well-Known Member Licensed User Longtime User Aug 21, 2016 #4 see here : https://www.b4x.com/android/forum/t...henticate-your-users.67875/page-2#post-435657 Upvote 0
Gentry Member Licensed User Longtime User Aug 21, 2016 #5 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). Upvote 0
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).
freedom2000 Well-Known Member Licensed User Longtime User Aug 21, 2016 #6 Gentry said: 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). Click to expand... OK ! So i don't know Upvote 0
Gentry said: 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). Click to expand... OK ! So i don't know
Erel B4X founder Staff member Licensed User Longtime User Aug 21, 2016 #7 The code you posted cannot work. You don't have access to the internal authentication process so you cannot access any internal token. Check this tutorial: OAuth 2.0 / Google web services tutorial Upvote 0
The code you posted cannot work. You don't have access to the internal authentication process so you cannot access any internal token. Check this tutorial: OAuth 2.0 / Google web services tutorial
Gentry Member Licensed User Longtime User Aug 21, 2016 #8 Thanks for the confirm, guess we need to skin the cat a different way. Already had google oauth in the UI, was trying to avoid multiple login processes for the user. Gentry Upvote 0
Thanks for the confirm, guess we need to skin the cat a different way. Already had google oauth in the UI, was trying to avoid multiple login processes for the user. Gentry