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

feature(ClerkAuthSSR): Enable and provide example of using SSR with Clerk #51

Merged
merged 2 commits into from
Mar 2, 2023

Conversation

roguealexander
Copy link
Contributor

@roguealexander roguealexander commented Mar 1, 2023

By passing pageProps through to ClerkProvider, all the functions in app/utils/clerk will have an initial context set and will resolve immediately during server side render.

I've also provided an example in nextjs/pages/home of a getServerSideProps that includes the necessary context in pageProps. The result is that the Sign Out button doesn't pop in when loading the Home page.

I've implemented this in my own project and figured some others wouldn't mind the help getting it set up.

LMK if there is a better or standard way to do this ofc.

@vercel
Copy link

vercel bot commented Mar 1, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @chen-rn on Vercel.

@chen-rn first needs to authorize it.

@chen-rn
Copy link
Owner

chen-rn commented Mar 2, 2023

Oh whoa, this is really cool!

Appreciate the great PR!

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.

2 participants