āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/clerk/clerk-docs/getting-started/quickstart.ruby ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
<TutorialHero exampleRepo={[ { title: "Ruby Quickstart Repo", link: "https://github.com/clerk/clerk-sdk-ruby/tree/main/apps"
}
]} beforeYouStart={[ { title: "Set up a Clerk application", link: "/docs/getting-started/quickstart/setup-clerk", icon: "clerk", } ]} />
Learn how to use Clerk to quickly and easily add secure authentication and user management to your Ruby app. If you would like to use a framework, see the reference docs.
<Steps> ## Install `clerk-sdk-ruby` <Include src="_partials/ruby/installation" />Clerk::SDK instanceAll available methods are listed in the Ruby HTTP Client documentation{{ target: '_blank' }}. The Ruby HTTP Client is a generated wrapper around the Backend API{{ target: '_blank' }} that provides a more Ruby-friendly interface.
To access available methods, you must instantiate a Clerk::SDK instance.
sdk = Clerk::SDK.new
create_user_request = Clerk::SDK::CreateUserRequest.new(
first_name: "John",
last_name: "Doe",
email_address: ["john.doe@example.com"],
password: "password"
)
# Create a user
sdk.users.create(create_user_request)
# List all users and ensure the user was created
sdk.users.get_user_list
# Get the first user created in your instance
user = sdk.users.get_user_list(limit: 1).first
# Use the user's ID to lock the user
sdk.users.lock_user(user["id"])
# Then, unlock the user so they can sign in again
sdk.users.unlock_user(user["id"])
</Steps>
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā