Closed alexey13 closed 6 years ago
Problem was in id. In wordpress its a number. It would be great to support numbers as id.
Hey @alexey13 thanks for the feedback.
Making authentication and authorization clearer is something that's high up on our backlog.
I'm glad you managed to figure it out (and sorry for the hassle!).
Just to be clear, were you making a call to generateTokenPair
with a number as the id
?
It could be that we could throw an error if the user ID provided to the call isn't a string.
Yes. I tried to generateTokenPair with a number as the id and got 403 error (forbidden), thats why i thought problem with tokenprovider url or with something else.
@alexey13 we've made a change on the server so that you'll get a nice error back like this:
{
"error": "services/chatkit/unprocessable_entity/validation_failed",
"error_description": "Expected `id` to be of type string but got number",
"error_uri": "https://docs.pusher.com/errors/services/chatkit/unprocessable_entity/validation_failed"
}
Good day! What kind of url should be in tokenprovider? Would appreciate for examples. Cant understand how to generate tokens and send them in header.