RedNexX

JAVA USER LOGIN/LOGOUT

Aug 26th, 2020
1,285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. //------GET USER TOKEN-------
  2. FirebaseUser mUser = FirebaseAuth.getInstance().getCurrentUser();
  3. mUser.getToken(true)
  4.         .addOnCompleteListener(new OnCompleteListener<GetTokenResult>() {
  5.             public void onComplete(@NonNull Task<GetTokenResult> task) {
  6.                 if (task.isSuccessful()) {
  7.                     String idToken = task.getResult().getToken();
  8.                       // ...
  9.                 }
  10.             }
  11.         });
Advertisement
Add Comment
Please, Sign In to add comment