B4J Question FirebaseServer + jRdc2

Alexander Stolte

Expert
Licensed User
Longtime User
With every query to jRDC2, do I have to Verify the user Token?
 

DonManfred

Expert
Licensed User
Longtime User
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

Alexander Stolte

Expert
Licensed User
Longtime User
The FirebaseIdToken is not a AccessToken
but a token with which I can ensure that the user is authenticated with his email and password or not?

The IDToken can change. You need to do a new check on the new token if it changes.
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

Alexander Stolte

Expert
Licensed User
Longtime User
but with what return value then? The "idToken" is different for every user and when I log in again the idToken is also different.

Why? Once the user is authenticated you can set a flag in the user session object and treat this user as an authenticated user.
ok, i'll check it out.
 
Upvote 0
Top