question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove requirement of token for initialization

See original GitHub issue

My current understanding is that for a client side token you need to request a user token from a backend (in my case a serverless function) and use that to pass into the StreamApp component. However, the StreamApp component crashes and breaks if it does not receive a proper token:

TypeError: Cannot read property 'data' of undefined
Function.initClientState
src/Context/StreamApp.js:225
  222 | ...state,
  223 | client,
  224 | user: client.currentUser,
> 225 | userData: client.currentUser.data,
      | ^  226 | analyticsClient,
  227 | sharedFeedManagers: {},
  228 | errorHandler: props.errorHandler,

This is an issue because I do not want to wait on that API call to return a user token in order to initialize streams context which sits at a high level therefore it essentially blocks the entire application.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
MartinCupelacommented, Nov 21, 2021

@juanludlf this request is in backlog for now

0reactions
juanludlfcommented, Nov 21, 2021

Hi @TylerAHolden @MartinCupela

Did you solve this problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Initialize Safenet Token - GlobalSign Support
This article will walk you through initializing your Safenet Token. This is a requirement when you first set up your token. It may...
Read more >
c# - How do I remove token in syntax tree in roslyn. e.g. ...
Found the answer. To remove, replace the token with new token of kind none. Awkward but works. var noneToken = SyntaxFactory.Token(SyntaxKind.
Read more >
Obtaining and Deleting a Push Token-Basic Capabilities ...
Scenario Description. A token uniquely identifies an app on a device. An app can call the getToken method to request a token from...
Read more >
Using the token model | Authorization - Google Developers
Call initTokenClient() to initialize a new token client with your web ... your app will have access only to those resources required by...
Read more >
Multifactor Authentication (One-Time Password) - Thales Docs
>The HSM token must be initialized and a PIN set for the specified role ... Use the ctotp utility to remove the multifactor...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found