Clerk is a developer-first authentication and user management solution. It provides pre-built React components and hooks for sign-in, sign-up, user profile, and organization management. Clerk is designed to be easy to use and customize, and can be dropped into any React or Next.js application.
After following the quickstart you'll have learned how to:
- Install
@clerk/nextjs - Set your Clerk API keys
- Add Clerk's middleware
- Add
<ClerkProvider />and Clerk components - Run E2E Cypress tests
npm run cypress:openTo run the example locally, you need to:
- Sign up for a Clerk account at https://clerk.com.
- Go to the Clerk dashboard and create an application.
- Set the required Clerk environment variables as shown in the example
env.local.examplefile. npm installthe required dependencies.npm run devto launch the development server.
- See the
testing-tokens.cy.tsfile for Cypress E2E tests. - Set the
test_userandtest_passwordto the credentials of the test account shown in the example.cypress.env.json.examplefile. npm run cypress:opento launch the development server. This will open the Cypress window, which must remain open throughout testing.- In Cypress, choose your preferred browser to test. A new browser window should open.
- From
Specs, select a test to run it.
If you aren't running your app on localhost:3000, update the baseUrl in cypress.config.ts to match your development server's URL.
To learn more about Clerk and Next.js, check out the following resources:
- Quickstart: Get started with Next.js and Clerk
- Clerk Documentation
- Next.js Documentation
- Testing with Cypress
- Cypress Documentation
Feel free to create a support thread on our Discord. Our support team will be happy to assist you in the #support channel.
You can discuss ideas, ask questions, and meet others from the community in our Discord.
If you prefer, you can also find support through our Twitter, or you can email us!
