Server-side rendering such as Next.JS brings many benefits, but when it comes to protecting routes, it brings its own wrinkles. For example, this approach by Tyler McGinnis won't work. Another example is simply checking for some property in localStorage won't work in getInitialProps, because localStorage is a property of the global window object which does not exist on NodeJS. If you know of others, would you mind sharing?
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)