Closed razzius closed 4 years ago
Currently:
async componentDidMount() { const { token } = this.state if (token !== null && window.location.pathname !== '/verify') { try { const account = await verifyToken(token) this.setState({ account }) } catch (e) { console.error('App componentDidMount: error causing token to clear', e) clearToken() this.setState({ token: null }) } this.setState({ loading: false }) } }
This means that any error in verifyToken will cause the localstorage to clear. This may be causing logout issues.
verifyToken
Fixed by switching to cookie-based sessions.
Currently:
This means that any error in
verifyToken
will cause the localstorage to clear. This may be causing logout issues.