TempId looks like this:
new Uint8Array([1, 252, 232, 40, 235, 180, 121, 67, 150, 7, 110, 99, 195, 156, 150, 82, 131, 163, 84, 209, 102, 76, 175, 209, 33, 104, 1, 251, 127, 70, 88, 178, 57, 216, 48, 202, 161, 248, 243, 170, 190, 126, 39, 111, 231, 116, 69, 133, 183, 59, 54, 1, 193, 110, 191, 48, 235, 14, 172, 162, 213, 181, 147, 83, 90])
Buffer.from(tempId).toString('base64'); returns this:
AfzoKOu0eUOWB25jw5yWUoOjVNFmTK/RIWgB+39GWLI52DDKofjzqr5+J2/ndEWFtzs2AcFuvzDrDqyi1bWTU1o=
CredId looks like this:
new Uint8Array([1, 252, 232, 40, 235, 180, 121, 67, 150, 7, 110, 99, 195, 156, 150, 82, 131, 163, 84, 209, 102, 76, 175, 209, 33, 104, 1, 251, 127, 70, 88, 178, 57, 216, 48, 202, 161, 248, 243, 170, 190, 126, 39, 111, 231, 116, 69, 133, 183, 59, 54, 1, 193, 110, 191, 48, 235, 14, 172, 162, 213, 181, 147, 83, 90])
base64.fromArrayBuffer(credId, true); returns this:
AfzoKOu0eUOWB25jw5yWUoOjVNFmTK_RIWgB-39GWLI52DDKofjzqr5-J2_ndEWFtzs2AcFuvzDrDqyi1bWTU1o
As you can see, the token are very similar, but there are a couple of differences ('=' at the end, '/' instead of '_', and '-' instead of '+'. Why does that happen?