Skip to content

Commit 21fcb79

Browse files
committed
fixed
1 parent b933b4f commit 21fcb79

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

auth/src/main/java/com/google/firebase/quickstart/AuthSnippets.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ public static void verifyIdTokenCheckRevoked(String idToken) throws InterruptedE
212212
try {
213213
// Verify the ID token while checking if the token is revoked by passing checkRevoked
214214
// as true.
215-
FirebaseToken decodedToken = FirebaseAuth.getInstance().verifyIdTokenAsync(idToken, true).get();
215+
boolean checkRevoked = true;
216+
FirebaseToken decodedToken = FirebaseAuth.getInstance().verifyIdTokenAsync(idToken, checkRevoked).get();
216217
String uid = decodedToken.getUid();
217218
System.out.println("Decoded ID token not revoked from user: " + uid);
218219
}
@@ -244,8 +245,7 @@ public static void revokeIdTokens(String idToken) throws InterruptedException, E
244245
// Save the refresh token revocation timestamp. This is needed to track ID token
245246
// revocation via Firebase rules.
246247
DatabaseReference ref = FirebaseDatabase.getInstance().getReference("metadata/" + uid);
247-
ref.setValueAsync(MapBuilder.of("revokeTime", revocationSecond));
248-
System.out.println("Decoded ID token from user: " + uid);
248+
ref.setValueAsync(MapBuilder.of("revokeTime", revocationSecond)).get();
249249
// [END save_revocation_in_db]
250250

251251
}

0 commit comments

Comments
 (0)