Hacker News new | ask | show | jobs
by lewi 27 days ago
Typed out an entire prompt on the homepage, hit enter, was redirected to sign-up & completed it.

My few hundred word prompt wasn't saved/persisted. :'(

4 comments

Having dealt with similar problems on the implementation side it's incredible how in this day and age it's still so difficult to pass state through sign-in or sign-up.

Half of the reason appears to be how the Oauth 2.0 standard is written - it purposefully forbids browser-specific items like the hash fragment in the URL. For passing state you have the "state" field but, despite the name, its original purpose was to prevent XSRF attacks, not store data.

Vendor libraries don't go to huge lengths to help here, as they settle on complying with the standard.

Why not just use OPFS?
What if you're redirected to a different origin? Not a common use case, but it does occur when you e.g. have several services and select where to go in the sign-in form.

Ideally one should be able to pass structured state throughout, but all we have is `state` really.

Sure but the idea is that your content should be on the same origin after the redirect.
Requiring login after getting user input is a dark pattern.

This bad implementation of it makes it even worse.

I hate it with a passion and I will boycott services that do those inconsiderate things to me.

True, but it's extremely effective at getting registrations, almost to the point that you're dooming yourself without it. Anyone and everyone uses it, big and small. Google can afford any random user to run a few queries before dangling the hook, but it's all the same.
Most dark patterns are indeed done for the benefit of the one who is doing them.
We just updated the product! now your initial prompt is passed by after you sign-up
But you still let the user put in the effort before revealing they'll have to sign up. Just be upfront.
Same. Hated it so much.
This pattern is for some reason very common in AI providers, and absolutely despicable.