I'm using the chat integration like described here:
https://html5-chat.com/blog/jwt-a-quicker-and-simpler-version-using-the-html5-service/
Whih works fine for some users and some not.
Now I found out why:
I'm creating my data structure like this
Than before sending it to the JWT service I have to bas64 encode it.
BUT the bas64 coding also uses the / character. And for some users the Base64 encoded string has a / in it.
And here the problem begin.
As this created string is part of the URL the JWT service does not get the complete encoded string.
for Example:
the Base 64 encoded string looks something like "sfeDf/fdsafsaw234"
the JWT URL is:
In this case the JWT service does not return the Token. It returns the follwoing error message
Array
(
[0] => sfeDf
[1] => fdsafsaw234
)
Bad count parameter:2
For using base64 encoded strings in a URL there is workaround to replace the /
like this:
function base64url_encode($data) {
return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}
But of course than the JWT service is not working
Does anybody know how to use the JWT service so that it's really working .....