Single Sign-On

Set Up Magic Link

Learn How to configure a Magic Link connection

To create a Magic Link Connection, all you'll need is the enterprise customer's domain.

Click "Single Sign-on" in the left-hand sidebar, and navigate to "Connections".

Then, click the "New Connection" button.

Enter the name of your client in the "Company name" field, as well as their domain in the "Domain" field.

Step 2. Create a new Passwordless Session for the User

Passwordless Sessions should be created as Users request a Magic Link to sign in.

Sessions can be created with a request to the WorkOS API.

Connection Sessions can be monitored as they are created, verified, and expired in the WorkOS Dashboard.

Developers will receive a Magic Link after creating the Passwordless Session for the User to authenticate with.

Developers can either implement a custom e-mail to send the Magic Link or can send the URL via the WorkOS API.

Step 4. Retrieve the authenticated User's Profile

After the Magic Link is verified, WorkOS will issue a redirect to the default Redirect URI with a code parameter.

Note: If the Magic Link has expired, WorkOS will issue a redirect with an error query parameter and value of access_denied.

Then, the code value can be exchanged to fetch a Profile.

Fetching authenticated Profiles is done with the same exact flow as WorkOS SSO.