Keycloak Realm Setup for BitDive
This guide explains how to create a new Keycloak realm, configure a client, and set up a user for the BitDive application.
Step 1: Create a New Realm​
- Access the Keycloak Admin Console at
https://localhost/keyCloak
- Log in using the credentials you configured in your
.env
file:
KEYCLOAK_ADMIN=your_keycloak_user
KEYCLOAK_ADMIN_PASSWORD=your_keycloak_password
- Navigate to the Realms section.
- Click Add Realm and specify a name for your new realm:
bitdive
- Save the configuration.
Step 2: Configure a New Client​
- In the newly created realm, go to the Clients section.
- Click Create to add a new client.
- Provide the following configuration:
- Client ID:
react-client
- Valid Redirect URIs:
https://your-domain/*
- Web Origins:
https://your-domain
- Client ID:
- Save the client configuration.
Step 3: Create a New User​
- Navigate to the Users section of your realm.
- Click Add User to create a new user.
- Specify a Username for the user.
- Save the user configuration.
Set Up the User Password​
- Open the created user's settings.
- Go to the Credentials tab.
- Set a new password and confirm it.
- Optionally, disable Temporary Password if you want the user to keep the password permanently.
Notes​
- Replace
https://your-domain
with the actual URL of your server (e.g.,https://localhost
for local development). - Ensure the
react-client
matches the client ID used in your application configuration. - The realm name should be
bitdive
to match the application configuration.
This setup ensures that your BitDive application can authenticate users through Keycloak.