dixonbydesign
08/31/2017, 6:32 PMuser
query to get data for the currently logged in user. When my app renders on the server the user and data are present but when it renders on the client the user is null
. It seems other queries are working as expected. Any ideas what my issue could be? Thanks!nilan
08/31/2017, 6:42 PMdoug_w
08/31/2017, 8:16 PMnetworkInterface.use([{
applyMiddleware (req, next) {
if (!req.options.headers) {
req.options.headers = {}
}
// get the authentication token from local storage if it exists
if (localStorage.getItem('auth0IdToken')) {
req.options.headers.authorization = `Bearer ${localStorage.getItem('auth0IdToken')}`
}
next()
}
}])
Was not the same token I was setting in local storage:
window.localStorage.setItem('diffAuth0IdToken', authResult.idToken)
doug_w
08/31/2017, 8:17 PMnull
dixonbydesign
08/31/2017, 8:24 PMnull
when rendered on the server? That's the weird thing is I can see the correct props when I log them server-side.dixonbydesign
08/31/2017, 8:24 PMdixonbydesign
08/31/2017, 8:49 PM