Skip to content

Commit 614e4de

Browse files
committed
string equals, concatenation, comment
1 parent 53e9d97 commit 614e4de

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
@@ -214,11 +214,11 @@ public static void verifyIdTokenCheckRevoked(String idToken) throws InterruptedE
214214
// as true.
215215
boolean checkRevoked = true;
216216
FirebaseToken decodedToken = FirebaseAuth.getInstance().verifyIdTokenAsync(idToken, checkRevoked).get();
217+
// Token is valid and not revoked.
217218
String uid = decodedToken.getUid();
218-
System.out.println("Decoded ID token not revoked from user: " + uid);
219219
}
220220
catch (FirebaseAuthException e) {
221-
if ("id-token-revoked" == e.getErrorCode()) {
221+
if ("id-token-revoked".equals(e.getErrorCode())) {
222222
// Token is valid but has been revoked.
223223
// When this occurs, inform the user to reauthenticate or signOut() the user.
224224
} else {
@@ -235,7 +235,7 @@ public static void revokeIdTokens(String idToken) throws InterruptedException, E
235235
UserRecord user = FirebaseAuth.getInstance().getUserAsync(uid).get();
236236
// Convert to seconds as the auth_time in the token claims is in seconds too.
237237
long revocationSecond = user.getTokensValidAfterTimestamp() / 1000;
238-
System.err.println("Tokens revoked at: ", revocationSecond);
238+
System.err.println("Tokens revoked at: " + revocationSecond);
239239
// [END revoke_tokens]
240240

241241
// [START save_revocation_in_db]

0 commit comments

Comments
 (0)