Setup
1
Create a Clerk application
- Go to clerk.com and create an account
- Create a new application
- Select the authentication methods you want to support (e.g., Email, Google, GitHub)
2
Get your API keys
In the Clerk dashboard, go to API Keys and copy:
- Publishable key (starts with
pk_) - Secret key (starts with
sk_)
3
Set up webhooks
Ringee needs Clerk webhooks to sync user and organization events:
- Go to Webhooks in the Clerk dashboard
- Click Add Endpoint
- Set the endpoint URL to:
https://your-backend-url/api/clerk/webhook - Select the following events:
user.createduser.updateduser.deletedorganization.createdorganization.updatedorganizationMembership.createdorganizationMembership.deleted
- Copy the Signing Secret
4
Configure redirect URLs
In the Clerk dashboard, go to Paths and configure:
- Sign-in URL:
/auth/sign-in - Sign-up URL:
/auth/sign-up - After sign-in URL:
/dashboard/overview - After sign-up URL:
/dashboard/overview
5
Configure environment variables
Add the following to your
.env file:Environment Variables
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_PUBLISHABLE_KEY can be set to the same value. The NEXT_PUBLIC_ prefix makes it available to the Next.js frontend.
