Creating Users

In this lesson, we'll set up our first user in Keycloak, which we'll use later to test our authentication system for the restaurant review platform.

Setting Up Keycloak Realm

Before we can create users, we need to set up a dedicated realm in Keycloak for our application.

A realm in Keycloak is like a separate universe for your application's users and security settings.

If you haven't already, here's how to create a new realm:

  1. Log into the Keycloak Admin Console using your administrator credentials.

  2. Click on the dropdown in the top-left corner that says "master".

  3. Click "Create Realm".

  4. Enter "restaurant-review" as the realm name.

  5. Click "Create".

Creating Your First User

Now that we have our realm set up, let's create a test user.

Follow these steps to create a user:

  1. In the left sidebar, click on "Users".

  2. Click the "Add user" button.

  3. Fill in the following details:

Username: testuser Email: testuser@example.com First Name: Test Last Name: User
  1. Make sure "Email Verified" is switched ON.

  2. Click "Create".

Setting User Credentials

For development purposes, we'll set a simple password for our test user.

Here's how to set the password:

  1. After creating the user, go to the "Credentials" tab.

  2. Click "Set password".

  3. Enter these details:

Password: password Password Confirmation: password
  1. Switch "Temporary" to OFF so the user won't need to change their password on first login.

  2. Click "Save".

Development Considerations

Setting passwords manually like this is convenient during development, but it's not recommended for production environments.

In production, you should:

  • Use strong password policies
  • Enable email verification
  • Implement password reset flows
  • Consider enabling two-factor authentication

These security measures help protect your users and their data.

Summary

  • Added a new user testuser with basic profile information
  • Set up user credentials with password password
© 2026 Devtiro Ltd. All rights reserved