Next.js Discord

Discord Forum

twitterimage on protected route

Unanswered
Tiphiid wasp posted this in #help-forum
Open in Discord
Tiphiid waspOP
i have route that is protected on layout level by checking user session. inside this layout i have route that has a twitterimage. this causes the link send in example discord not have attached image because it redirects it to the auth page, is there any workaroud for it to attach image even if route is protected?

I thought about creating special route for redirects and checking on this level if the visitor is scraper or not, is this make any sense?

2 Replies

You'll want to move this route outside of this layout I guess
perhaps using route groups or changing your approach a bit?