keystone icon indicating copy to clipboard operation
keystone copied to clipboard

Add headless auth access to next-lite example

Open MichaelZaporozhets opened this issue 4 years ago • 6 comments
trafficstars

  • Add .env to define SESSION_SECRET
  • Share SESSION_SECRET across keystone & next app by using dotenv
  • Update example to use auth and session
  • Add a requestAuth module that can be used in next routes to resolve to an Authed User object or false by unsealing the session cookie set by the admin app.
  • Append name of authed user to h1 title to show this in action
  • Add a public path with logo to show how next's built-in static serving can be used.

MichaelZaporozhets avatar Apr 29 '21 23:04 MichaelZaporozhets

⚠️ No Changeset found

Latest commit: 7bba2a50a72480ffa2ba90c5b35f3361ff1972af

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Apr 29 '21 23:04 changeset-bot[bot]

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/3W65H2R7S9XMFxeTqGt8xu5Aodkz
✅ Preview: https://keystone-next-git-fork-michaelzaporozhets-master-key-23ed85.vercel.app

[Deployment for 7bba2a5 failed]

vercel[bot] avatar Apr 29 '21 23:04 vercel[bot]

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3bc07d2a4eb4cff0c3c807f73f786c60e6eb32d5:

Sandbox Source
@keystone-next/example-sandbox Configuration

codesandbox-ci[bot] avatar Apr 29 '21 23:04 codesandbox-ci[bot]

@MichaelZaporozhets this is great, thanks for the example!

A couple of things in here I want to fine-tooth-comb, but didn't want to leave you hanging. Will circle back with a proper review soon.

JedWatson avatar May 04 '21 23:05 JedWatson

@MichaelZaporozhets this is great, thanks for the example!

A couple of things in here I want to fine-tooth-comb, but didn't want to leave you hanging. Will circle back with a proper review soon.

No worries, Jed! There's no rush 😊

MichaelZaporozhets avatar May 05 '21 01:05 MichaelZaporozhets

It looks like there hasn't been any activity here in over 6 months. Sorry about that! We've flagged this issue for special attention. It wil be manually reviewed by maintainers, not automatically closed. If you have any additional information please leave us a comment. It really helps! Thank you for you contribution. :)

stale[bot] avatar Sep 19 '21 01:09 stale[bot]

Hi @MichaelZaporozhets,

Thanks for your example! It hasn't been rebased in a recent while (understandably), but I'm wondering if you think this is still a helpful example?

Maybe you could help us by adding a description about when this might be useful?

dcousens avatar Aug 15 '22 05:08 dcousens