0

I am using the getStream.io React component as follows:

<StreamApp
    apiKey='apiKey'
    appId='appId'
    token='token'
>
  <FlatFeed />
</StreamApp>

When I am hard-coding the above values, I do not see any issue and the app works correctly.

However, when I try to pass the token as state variable ( Token is generated on the server side and returned to user on client side on signup/login), I get an exception as follows :

enter image description here

Has anyone else seen this issue before? If yes, how did you get around this issue. Any help is highly appreciated.

LearnToLive
  • 462
  • 9
  • 25
  • 1
    if the token prop is not a valid JWT token (eg. an empty or "regular" string) you will get this error. did you try logging the state variable just to verify that the valid token is passed? – Tommaso Barbugli Jun 03 '19 at 07:18
  • Thanks @TommasoBarbugli. Yes, that is what was happening, initial state of the token was empty and hence it was throwing this error on startup – LearnToLive Jun 04 '19 at 21:19

0 Answers0