Skip to content

Commit f602b9c

Browse files
authored
Fix trimming padding.
1 parent 01b3649 commit f602b9c

File tree

1 file changed

+2
-1
lines changed
  • packages/rules-unit-testing/src/api

1 file changed

+2
-1
lines changed

packages/rules-unit-testing/src/api/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ export type FirebaseEmulatorOptions = {
159159
};
160160

161161
function trimmedBase64Encode(val: string): string {
162-
return base64Encode(val).split("=")[0];
162+
// Use base64url encoding and remove padding in the end (dot characters).
163+
return base64Encode(val).replace(/\./g, "");
163164
}
164165

165166
function createUnsecuredJwt(token: TokenOptions, projectId?: string): string {

0 commit comments

Comments
 (0)