Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: passing user from Server Component #1578

Merged
merged 3 commits into from
Nov 23, 2023
Merged

Conversation

seanparmelee
Copy link
Contributor

  • All new/changed/fixed functionality is covered by tests (or N/A) N/A
  • I have added documentation for all new/changed functionality (or N/A) N/A

📋 Changes

Updates the docs for UserProviderProps as well as updates example-app to demonstrate how to pass a user from a Server Component (as discussed in #1571).

📎 References

#1571

🎯 Testing

  1. Set the required env vars for the example-app
  2. Run npm run start:example
  3. Navigate to http://localhost:3000/
  4. Click Login and enter credentials.
  5. Upon returning to http://localhost:3000, refresh the page and confirm the "Login" link is not briefly shown.

Closes #1571

@seanparmelee seanparmelee requested a review from a team as a code owner November 22, 2023 15:45
Copy link

vercel bot commented Nov 22, 2023

@seanparmelee is attempting to deploy a commit to the Auth0 Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@adamjmcgrath adamjmcgrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @seanparmelee!

@@ -1,4 +1,5 @@
import './globals.css';
import { getSession } from '@auth0/nextjs-auth0';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @seanparmelee - we're gonna have to remove this from the sample app because it's making the Edge routes fail ('@auth0/nextjs-auth0' can only be imported on the Node runtime and layout.tsx is used in Node and Edge routes)

Copy link
Contributor

@adamjmcgrath adamjmcgrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to remove updates to sample app

auto-merge was automatically disabled November 23, 2023 14:33

Head branch was pushed to by a user without write access

Copy link
Contributor

@adamjmcgrath adamjmcgrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @seanparmelee 👍

@adamjmcgrath adamjmcgrath merged commit f8a2558 into auth0:main Nov 23, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example of passing user into UserProvider w/ App router
2 participants