We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fa86c1 commit afae655Copy full SHA for afae655
src/shared/components/Contentful/Route.jsx
@@ -176,8 +176,8 @@ function ContentfulRoute(props) {
176
const currentPathname = typeof location === 'undefined' ? '' : removeTrailingSlash(location.pathname);
177
const redirectToUrl = _.trim(fields.redirectToUrl);
178
const requireLogin = fields.protected;
179
- console.log('check route', requireLogin, auth, encodeURIComponent(url));
180
- if (requireLogin && (!auth || !auth.tokenV3)) {
+ const loggedIn = isomorphy.isClientSide() && cookies.get('tcjwt') !== null;
+ if (requireLogin && !loggedIn) {
181
// route is protected by TC Login
182
// send to login/register with proper retUrl set
183
const authUrl = config.URL.AUTH;
0 commit comments