-
Notifications
You must be signed in to change notification settings - Fork 145
Align the comments in the check revoked (verify id token) #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of nits.
// Token is invalid. | ||
} catch (ExecutionException e) { | ||
if (e.getCause() instanceof FirebaseAuthException) { | ||
if ( ((FirebaseAuthException) e.getCause()).getErrorCode().equals("id-token-revoked")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Break into a couple of lines:
FirebaseAuthException authError = ...;
@@ -240,7 +243,7 @@ public static void revokeIdTokens(String idToken) throws InterruptedException, E | |||
|
|||
// [START save_revocation_in_db] | |||
DatabaseReference ref = FirebaseDatabase.getInstance().getReference("metadata/" + uid); | |||
ref.setValueAsync(MapBuilder.of("revokeTime", revocationSecond)).get(); | |||
ref.setValueAsync(ImmutableMap.<String, Object>of("revokeTime", revocationSecond)).get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use HashMap here. ImmutableMap is a guava type and I don't think we want it to appear in snippets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.