Add something like Base64url
Ref: https://docs.microsoft.com/en-us/dotnet/api/microsoft.identitymodel.tokens.base64urlencoder.encode?view=azure-dotnet#Microsoft_IdentityModel_Tokens_Base64UrlEncoder_Encode_System_String_
"The following functions perform base64url encoding which differs from regular base64 encoding as follows
padding is skipped so the pad character '=' doesn't have to be percent encoded
the 62nd and 63rd regular base64 encoding characters ('+' and '/') are replace with ('-' and '_') The changes make the encoding alphabet file and URL safe."