B4J Question Firebase : Web apps auth, server backend verification

billzhan

Active Member
Licensed User
Longtime User
Hi,

I am trying to use firebase web page(browser with javascript) auth with Google/Facebook account.

User login in (browser) -> Firebase server -(jwt string)-> user web page (browser, data can be changed) -(jwt string)-> B4J server(need to be verified)

This verification is silimar to https://www.b4x.com/android/forum/t...rification-for-signed-in-users.68672/#content

The difference is the key(s) are Google keys (which changed peridiocally)


https://firebase.google.com/docs/auth/server/verify-id-tokens

Sample code:
// idToken comes from the client app (shown above)

FirebaseAuth.getInstance().verifyIdToken(idToken)
.addOnSuccessListener(new OnSuccessListener<FirebaseToken>() {
@override
public void onSuccess(FirebaseToken decodedToken) {
String uid = decodedToken.getUid();
// ...
}
});


My problem is how to verify the string
 
Top