patronage / bubs-next

Headless Wordpress + Next.js Project scaffolding
https://bubs-next.vercel.app
MIT License
37 stars 10 forks source link

Password Protected Pages #122

Open ccorda opened 3 years ago

ccorda commented 3 years ago

Low frequency event, but sometimes we do have projects with a handful of private pages that can set a password via WordPress. Ideally we'd be able to use the editor supplied password to grant access.

Research:

https://github.com/wp-graphql/wp-graphql/issues/930 https://javascript.plainenglish.io/implementing-simple-auth-to-your-next-js-website-using-next-js-auth-e136d77bb333

kylehotchkiss commented 2 years ago

Can be accomplished with middleware https://github.com/vercel/examples/tree/main/edge-functions/basic-auth-password - it'd be http auth though