I am a little bit confused.
1) two members said that the UserId sometimes... changes;
2) the TokenId was explicitly declared temporary by Erel:
https://www.b4x.com/android/forum/t...henticate-your-users.67875/page-2#post-435657
"... This method retrieves a temporary token id" (the method is GetUserTokenID)
but then Erel created jFirebaseServer library, with this comment:
"This means that the signed in user gets a token id (long string) from Firebase services by calling FirebaseAuth.GetUserTokenId. The client sends the token id to the server.
The server verifies the token using this library".
Which, for me, means: "save this TokenID somewhere on your server (users db) to verify user and app"; but... using a temporary token?
Finally, GetUserTokenId, given its name and the parameter it requires, a FirebaseUser object, I think it retrives a TokenId associated to that user, so I don't understand why we should be sure that was our app to send the request (login, for example).
Finally 2, the revenge : it's a little bit hard to create a "standard login", with GUI, allowing the user to choose between a "custom login" (Email, PW) and Google-Firebase login, because of:
events (SignedIn - which seems to be raised after Activity_Resume - and TokenAvailable);
you should check for an active internet connection (and the only way I found is valid is to download something from somewhere);
etc.
(perhaps this is not the right time to think about all this... 3:37 A.M. )
1) two members said that the UserId sometimes... changes;
2) the TokenId was explicitly declared temporary by Erel:
https://www.b4x.com/android/forum/t...henticate-your-users.67875/page-2#post-435657
"... This method retrieves a temporary token id" (the method is GetUserTokenID)
but then Erel created jFirebaseServer library, with this comment:
"This means that the signed in user gets a token id (long string) from Firebase services by calling FirebaseAuth.GetUserTokenId. The client sends the token id to the server.
The server verifies the token using this library".
Which, for me, means: "save this TokenID somewhere on your server (users db) to verify user and app"; but... using a temporary token?
Finally, GetUserTokenId, given its name and the parameter it requires, a FirebaseUser object, I think it retrives a TokenId associated to that user, so I don't understand why we should be sure that was our app to send the request (login, for example).
Finally 2, the revenge : it's a little bit hard to create a "standard login", with GUI, allowing the user to choose between a "custom login" (Email, PW) and Google-Firebase login, because of:
events (SignedIn - which seems to be raised after Activity_Resume - and TokenAvailable);
you should check for an active internet connection (and the only way I found is valid is to download something from somewhere);
etc.
(perhaps this is not the right time to think about all this... 3:37 A.M. )
Last edited: