B billzhan Active Member Licensed User Longtime User Nov 1, 2016 #1 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) Must correspond to one of the public keys listed at https://www.googleapis.com/robot/v1/metadata/x509/securetoken@system.gserviceaccount.com Click to expand... 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(); // ... } }); Click to expand... My problem is how to verify the string
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) Must correspond to one of the public keys listed at https://www.googleapis.com/robot/v1/metadata/x509/securetoken@system.gserviceaccount.com Click to expand... 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(); // ... } }); Click to expand... My problem is how to verify the string
Erel B4X founder Staff member Licensed User Longtime User Nov 1, 2016 #2 FirebaseServer (or the native FirebaseAuth) can only verify Firebase tokens. It will not work with other types of keys. Upvote 0
FirebaseServer (or the native FirebaseAuth) can only verify Firebase tokens. It will not work with other types of keys.