Setup
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)
Get your API keys
In the Clerk dashboard, go to API Keys and copy:
- Publishable key (starts with
pk_) - Secret key (starts with
sk_)
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
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
Environment Variables
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | Yes | Clerk publishable key (exposed to frontend) |
CLERK_PUBLISHABLE_KEY | Yes | Clerk publishable key (backend) |
CLERK_SECRET_KEY | Yes | Clerk secret key |
CLERK_WEBHOOK_SIGNING_SECRET | Yes | Webhook signing secret |
NEXT_PUBLIC_CLERK_SIGN_IN_URL | No | Sign-in page path (default: /auth/sign-in) |
NEXT_PUBLIC_CLERK_SIGN_UP_URL | No | Sign-up page path (default: /auth/sign-up) |
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL | No | Redirect after sign-in (default: /dashboard/overview) |
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL | No | Redirect after sign-up (default: /dashboard/overview) |
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.
