@@ -99,7 +99,7 @@ public static void setCustomUserClaims(
99
99
// Set admin privilege on the user corresponding to uid.
100
100
Map <String , Object > claims = new HashMap <>();
101
101
claims .put ("admin" , true );
102
- FirebaseAuth .getInstance ().setCustomClaimsAsync (uid , claims ).get ();
102
+ FirebaseAuth .getInstance ().setCustomUserClaimsAsync (uid , claims ).get ();
103
103
// The new custom claims will propagate to the user's ID token the
104
104
// next time a new one is issued.
105
105
// [END set_custom_user_claims]
@@ -128,7 +128,7 @@ public static void setCustomUserClaimsScript() throws InterruptedException, Exec
128
128
if (user .isEmailVerified ()) {
129
129
Map <String , Object > claims = new HashMap <>();
130
130
claims .put ("admin" , true );
131
- FirebaseAuth .getInstance ().setCustomClaimsAsync (user .getUid (), claims ).get ();
131
+ FirebaseAuth .getInstance ().setCustomUserClaimsAsync (user .getUid (), claims ).get ();
132
132
}
133
133
// [END set_custom_user_claims_script]
134
134
}
@@ -143,7 +143,7 @@ public static void setCustomUserClaimsInc() throws InterruptedException, Executi
143
143
// Add level.
144
144
currentClaims .put ("level" , 10 );
145
145
// Add custom claims for additional privileges.
146
- FirebaseAuth .getInstance ().setCustomClaimsAsync (user .getUid (), currentClaims ).get ();
146
+ FirebaseAuth .getInstance ().setCustomUserClaimsAsync (user .getUid (), currentClaims ).get ();
147
147
}
148
148
// [END set_custom_user_claims_incremental]
149
149
}
0 commit comments