-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chat SDK + Access Manager #180
Comments
Hello @manfe! Yes, it's okay to update the Access Manager token using setToken on the sdk property. However we noticed that a stale value will be used in the setLastReadMessageTimetoken and we need to fix it soon. You should be good to go with setToken. Regarding your second question: you can use code like this if you use React:
|
@piotr-suwala how are you able to import Because I am not seeing it exported. |
You're right. This is not exported. You can replace
with
|
@piotr-suwala another issue that I found. If I have listeners to a channel or messages and the token is updated, those messages will keep the old token and while we don't stop listen and listen again (re-render all messages) with new listeners will not be able to toggle reaction on them or take any action with the stale token. |
@manfe Did you use chatInstance.sdk.setToken("my-new-token") when your token is updated? Our PN Messages do not contain the AM token on their own. |
@piotr-suwala yes, I was using this approach, but old messages couldn't have any kind o reaction. So I had to initialize the chat again when a new token arrive. |
When Access Manager is enabled I am initializing the Chat SDK with:
But if I need to update the access manager token after a period of time, I noticed that the pubnub is wrapped into the
sdk
property.Is it ok to update the Access Manager token using the method below?
Or there is other recommended way to do it?
Also if I need to listen 403 errors I continue listening on that
sdk
property?The text was updated successfully, but these errors were encountered: