Skip to content

Commit 12fffc4

Browse files
author
Dominik Földi
committed
Allow 1000 bytes instead of 999 for serialized custom claims length
1 parent f8498f2 commit 12fffc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FirebaseAdmin/FirebaseAdmin/Auth/UserRecord.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ public static void CheckCustomClaims(IReadOnlyDictionary<string, object> customC
109109

110110
var customClaimsString = SerializeClaims(customClaims);
111111
var byteCount = Encoding.Unicode.GetByteCount(customClaimsString);
112-
if(byteCount >= 1000)
112+
if (byteCount > 1000)
113113
{
114-
throw new ArgumentException($"Claims have to be less than 1000 bytes when serialized");
114+
throw new ArgumentException($"Claims have to be not greater than 1000 bytes when serialized");
115115
}
116116
}
117117

0 commit comments

Comments
 (0)