Skip to main content
Docs

Clerk Ruby SDK

The Clerk Ruby SDK provides a powerful set of tools and utilities to seamlessly integrate authentication, user management, and organization management into your Ruby application.

To get started, refer to the appropriate guide:

Available environment variables

The Ruby SDK supports the following environment variables:

Variable nameUsage
CLERK_SECRET_KEYThe Secret Key of your instance (required)
CLERK_API_BASEOverrides the default API base URL: https://api.clerk.com/v1/
CLERK_SIGN_IN_URLRails view helper: clerk_sign_in_url
CLERK_SIGN_IN_UPRails view helper: clerk_sign_up_url
CLERK_USER_PROFILE_URLRails view helper: clerk_user_profile_url

Available methods

All available methods are listed in the Ruby HTTP Client documentation. The Ruby HTTP Client is a generated wrapper around the Backend API that provides a more Ruby-friendly interface.

Reverification

The reverification feature provides an additional layer of security by requiring users to reverify their session before accessing sensitive routes. By default, it is set to STRICT, but accepts the following presets:

  • Clerk::StepUp::Preset::LAX: Authenticated within the past day, requiring the second factor
  • Clerk::StepUp::Preset::MODERATE: Authenticated within the past hour, requiring the second factor
  • Clerk::StepUp::Preset::STRICT: Authenticated within the past 10 minutes, requiring the second factor
  • Clerk::StepUp::Preset::STRICT_MFA: Authenticated within the past 10 minutes, requiring both first and second factors

Feedback

What did you think of this content?

Last updated on