What is the best way to go about creating a record that requires a simple password (no username) to retrieve? In essence, I am trying to create a webpage that is password-protected, populated by data pulled from Payload.
this can be handled outside from payloadcms.
you can put auth middleware in the route itself, for the new page you are creating
We did have a plugin for this, but this was for an earlier version of payload.
I will share the code, but please just use it as reference - try not to copy/paste it into your project.
The idea is to set a cookie on the user so when they make a request you can check to see if the password in the cookie matches the password on the doc in a beforeRead operation. I would scope the cookie something like this
password-protection-${collectionSlug}-${docID}Star
Discord
online
Get dedicated engineering support directly from the Payload team.