Preview non-public links

There’s a recurring issue we see on community.wanikani.com where people want to share a specific page of wanikani.com, but since it’s only visible if you’re logged in, Discourse previews the login page instead. This happens because navigating to a private page when not logged in redirects to the login page.

For example:
WaniKani / Kanji / 目

becomes


I know that you can skip the preview by putting a space in front of it, but it seems like a lot of people don’t know about this (and for some reason many people don’t verify that the preview is correct), so it’s a fairly common occurrence that people post useless links, which causes confusion.

Other example where this issue occurs is linking to Amazon order history or payment settings:


Here’s two examples where the links are redirected to the login page, but they are not previewed here. I don’t know if that’s because of some smart logic handling those cases, or if the pages just aren’t considered previewable.

https://bunpro.jp/grammar_points/3

https://www.crunchyroll.com/home/queue

It seems like the WaniKani and Amazon examples are working similarly to other previewable redirected pages (like a link for the Wikipedia page on Final Fantasy Versus 13 showing the preview for the redirected page for Final Fantasy 15). It just happens that for those two examples, previewing the redirected page is detrimental.


Can this be improved in any way? At first I thought skipping previews for any redirected links might make sense, but with the Wikipedia example I think that could be too broad. Ideally links that redirect to things like login or 404 pages wouldn’t get previewed, but I’m not sure of a consistent way to detect that.

Also, it would be pretty cool if there was a way to provide a Discourse instance with login cookies (or whatever would be needed) for specific websites so that previews could be shown even for normally private pages.

3 Likes