The onboarding embed is a React component available in the
@calcom/atoms package. You need an OAuth client ID from Cal.com to use it. See OAuth setup for details on obtaining credentials.How it works
The onboarding embed guides users through four steps inside a modal dialog:- Sign up or log in — The user creates a new Cal.com account or signs in to an existing one.
- Profile setup — The user enters their name, username, and bio.
- Calendar connection — The user optionally connects a calendar (Google Calendar, Apple Calendar, etc.).
- OAuth authorization — The user reviews the permissions your app is requesting and clicks “Allow” or “Deny”.
Installation
Install the@calcom/atoms package:
Basic usage
Import theOnboardingEmbed component and add it to your page:
Configuration
Required props
Authorization object
Optional props
Authorization modes
The onboarding embed supports two ways to handle the authorization result.Callback mode
If you provide theonAuthorizationAllowed prop, the component calls your function with the authorization code and closes the dialog. This keeps the user on your page.
Redirect mode
If you do not provideonAuthorizationAllowed, the browser redirects to your redirectUri with the authorization code and state as URL parameters:
Pre-filling user details
You can pass auser prop to pre-fill the signup form:
Using PKCE
For public clients that cannot securely store a client secret, use PKCE (Proof Key for Code Exchange) by including acodeChallenge in the authorization object:
Custom trigger element
By default, the embed renders a “Continue with Cal.com” button. You can replace it with your own element:Error handling
TheonError callback receives an error object with a code and message. The possible error codes are: