PhotonChat JavaScript SDK doesn't load messages history with custom authentication provider enabled

I've already created a discussion on topic of messages history earlier ( Now I found out that messages history is not being loaded only in case when custom authentication provider is used (eg. setCustomAuthentication method of PhotonChatClient instance is called). I think that's a bug on PhotonChat JS SDK side. How can we fix this issue? Thank you.


  • Hello @vadim and @JohnTube, you've previously helped me a lot with the issue of history loading, I hope for your help in this matter too :)
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @rjkz808,

    I don't see how these two could be related.
    When using custom authentication you probably end up w/ the same UserId per user right?

    How could we reproduce this without chat webhooks?
    Maybe @vadim could try the minimal steps you provide using the JavaScript SDK.
  • @JohnTube I don't know if it matters or not - I don't set UserId value in SDK itself when I use custom authentication provider. My endpoint responds with a UserId value which (I hope) is being used in PhotonChat to identify users.
  • Only channel name and other 'subscribe' operation parameters may affect history retrieval. Custom authentication or user name can't break the history in theory. And we could not reproduce it.
    Can you please provide us with small demo reproducing the issue?

    Does client successfully send messages to and receive messages from the channel after subscription?
    Are you sure that the channel exists, i.e. some other client are subscribed at it when you trying to subscribe? What is in your logs? It's always a good idea to share you client logs written with maximum logging level when posting a bug.
  • 1. When multiple clients are connected to the same channel, they all receive new messages from that channel
    2. I don't see any difference in logs when using custom authentication provider apart from logs that tell me about my authentication service connection itself
    3. I don't change 'subscribe' parameters when using either custom authentication or raw client