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

Add NextJS support #119

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Add NextJS support #119

merged 1 commit into from
Jun 13, 2024

Conversation

JakeLo123
Copy link
Collaborator

@JakeLo123 JakeLo123 commented Jun 12, 2024

What is this PR and why do we need it?

#99 -- NextJS Support

The implementation follows the same pattern we use to support Nuxt (see PR for #74 -- #98).

Using the React SDK in a NextJS app will require that the Next app installs next-client-cookies as a dependency and wraps their app in the cookies provider from that library. I added a configuration-with-nextjs section added to the package's README.

For testing and development, I've created this repo. It's a nextjs app configured with the fusionauth react sdk--you'll want the sdk-added branch if you use this. You'll still have to use yalc or whatever you want to consume the SDK.

  • pull down the sample app repo and checkout to sdk-added.
  • pull down the monorepo and run yarn yalc-pub:sdk-react
  • consume the sdk from yalc in the sample app.
  • test the features of the sdk

Pre-Merge Checklist (if applicable)

  • Unit and Feature tests have been added/updated for logic changes, or there is a justifiable reason for not doing so.

@JakeLo123 JakeLo123 added enhancement New feature or request React labels Jun 12, 2024
@JakeLo123 JakeLo123 self-assigned this Jun 12, 2024
@JakeLo123 JakeLo123 linked an issue Jun 12, 2024 that may be closed by this pull request
@JakeLo123 JakeLo123 force-pushed the 99-nextjs-support branch from 6e1d64c to 5ab1f2b Compare June 12, 2024 17:11
@JakeLo123 JakeLo123 mentioned this pull request Jun 12, 2024
@JakeLo123 JakeLo123 merged commit 9d00214 into main Jun 13, 2024
3 checks passed
@JakeLo123 JakeLo123 deleted the 99-nextjs-support branch June 13, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request React
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NextJS support
3 participants