Alexander Stolte Expert Licensed User Longtime User Jul 7, 2020 #1 With every query to jRDC2, do I have to Verify the user Token? [server] FirebaseServer - backend verification for signed in users Users can sign in to your B4A or B4i apps using Google or Facebook with the FirebaseAuth libraries. FirebaseServer completes the puzzle with server side verification of the user. This means that the signed in user gets a token id (long string) from Firebase services by calling... www.b4x.com
With every query to jRDC2, do I have to Verify the user Token? [server] FirebaseServer - backend verification for signed in users Users can sign in to your B4A or B4i apps using Google or Facebook with the FirebaseAuth libraries. FirebaseServer completes the puzzle with server side verification of the user. This means that the signed in user gets a token id (long string) from Firebase services by calling... www.b4x.com
DonManfred Expert Licensed User Longtime User Jul 7, 2020 #2 B4X: Sub fs_TokenVerified (TokenId As String, Success As Boolean, Token As FirebaseToken) If Success Then Log(Token.DisplayName) Log(Token.Email) Log(Token.Uid) End If End Sub It is up to you to store the successfully check of a token in your DB to do it only if not already verified. Upvote 0
B4X: Sub fs_TokenVerified (TokenId As String, Success As Boolean, Token As FirebaseToken) If Success Then Log(Token.DisplayName) Log(Token.Email) Log(Token.Uid) End If End Sub It is up to you to store the successfully check of a token in your DB to do it only if not already verified.
Alexander Stolte Expert Licensed User Longtime User Jul 7, 2020 #3 The problem is, the access token expires every hour, so I have to inquire with every request whether it is still valid? Upvote 0
The problem is, the access token expires every hour, so I have to inquire with every request whether it is still valid?
DonManfred Expert Licensed User Longtime User Jul 7, 2020 #4 how are accesstoken with the firebase instance id token in common? Upvote 0
Alexander Stolte Expert Licensed User Longtime User Jul 7, 2020 #5 DonManfred said: how are accesstoken with the firebase instance id token in common? Click to expand... I mean the user "idToken" which the user gets back when he logs in. Firebase Auth REST API firebase.google.com Upvote 0
DonManfred said: how are accesstoken with the firebase instance id token in common? Click to expand... I mean the user "idToken" which the user gets back when he logs in. Firebase Auth REST API firebase.google.com
DonManfred Expert Licensed User Longtime User Jul 7, 2020 #6 The FirebaseIdToken is not a AccessToken The IDToken can change. You need to do a new check on the new token if it changes. Upvote 0
The FirebaseIdToken is not a AccessToken The IDToken can change. You need to do a new check on the new token if it changes.
Alexander Stolte Expert Licensed User Longtime User Jul 7, 2020 #7 DonManfred said: The FirebaseIdToken is not a AccessToken Click to expand... but a token with which I can ensure that the user is authenticated with his email and password or not? DonManfred said: The IDToken can change. You need to do a new check on the new token if it changes. Click to expand... Thats the problem, so i have to check every time if the token is still valid, if not, i have to say to the app, "renew the token". Thanks! Upvote 0
DonManfred said: The FirebaseIdToken is not a AccessToken Click to expand... but a token with which I can ensure that the user is authenticated with his email and password or not? DonManfred said: The IDToken can change. You need to do a new check on the new token if it changes. Click to expand... Thats the problem, so i have to check every time if the token is still valid, if not, i have to say to the app, "renew the token". Thanks!
Erel B4X founder Staff member Licensed User Longtime User Jul 7, 2020 #8 Alexander Stolte said: Thats the problem, so i have to check every time if the token is still valid, if not, i have to say to the app, "renew the token". Click to expand... Why? Once the user is authenticated you can set a flag in the user session object and treat this user as an authenticated user. Upvote 0
Alexander Stolte said: Thats the problem, so i have to check every time if the token is still valid, if not, i have to say to the app, "renew the token". Click to expand... Why? Once the user is authenticated you can set a flag in the user session object and treat this user as an authenticated user.
DonManfred Expert Licensed User Longtime User Jul 7, 2020 #9 Alexander Stolte said: that the user is authenticated with his email and password or not? Click to expand... No! I do have a Token in any of my apps using Firebasenotification. This does not imply i did use firebase auth to authenticate myself. Upvote 0
Alexander Stolte said: that the user is authenticated with his email and password or not? Click to expand... No! I do have a Token in any of my apps using Firebasenotification. This does not imply i did use firebase auth to authenticate myself.
Alexander Stolte Expert Licensed User Longtime User Jul 7, 2020 #10 DonManfred said: No! Click to expand... but with what return value then? The "idToken" is different for every user and when I log in again the idToken is also different. Erel said: Why? Once the user is authenticated you can set a flag in the user session object and treat this user as an authenticated user. Click to expand... ok, i'll check it out. Upvote 0
DonManfred said: No! Click to expand... but with what return value then? The "idToken" is different for every user and when I log in again the idToken is also different. Erel said: Why? Once the user is authenticated you can set a flag in the user session object and treat this user as an authenticated user. Click to expand... ok, i'll check it out.