Welcome to the new Box Support website. Check out all the details here on what’s changed.

React - Unable to pass token to Content Explorer

Answered
New post

Comments

3 comments

  • dhebert-dev

    Checking to see if anyone has a solution for this issue as it is blocking our progress with getting Box implemented with our app. 

    0
    Comment actions Permalink
  • ConradChan

    Hi  ,

     

    It seems like the root of the issue is that ContentExplorer does not handle a string access token being changed after mounting.

     

    You probably have two options:

    1. Render ContentExplorer conditionally based on when your have resolved your token
    2. Use a token generator function instead -- I couldn't find a good example in box-ui-elements, but here is some documentation from box-content-preview: https://github.com/box/box-content-preview#token-generator-function

    Hope that helps,

    Conrad

    0
    Comment actions Permalink
  • dhebert-dev

    Thank you! So the solution here was to conditionally render Content Explorer. That helped me a lot. Thanks so much. 

    0
    Comment actions Permalink

Please sign in to leave a comment.