> To test configurations on your `localhost`, the `--hostname-url` flag can be used to change the _Redirect URI_ and other relevant fields' prefixes. The following example is not persistent between executions:
<imgsrc="/assets/images/integrations/keycloak/identity-providers.png"alt="Screenshot of the Identity Providers menu. The OpenID Connect v1.0 button is marked with a red box.">
On Codeberg, [go to "**Settings**", then "**Applications**"](https://codeberg.org/user/settings/applications). You should be able to find a section called _Manage OAuth2 Applications_.
**Applications** can also be created under an **org** as opposed to being tied to one user's account, keeping your Application safe from a single point of failure:
The _Application Name_ can be arbitrary; we will use "My Keycloak Instance" for illustrative purposes. Make sure to paste the _Redirect URI_ that was shown in Keycloak earlier.
<imgsrc="/assets/images/integrations/keycloak/manage-oauth2-applications.png"alt="Screenshot of Manage OAuth2 Applications section in Application settings on Codeberg.">
<imgsrc="/assets/images/integrations/keycloak/new-oauth2-application.png"alt="Screenshot of the newly created application on Codeberg; it contains some generic information about the application, as well as the Client ID and Client Secret credentials.">
</picture>
## Finish configuring Keycloak
Let's finish configuring the OpenID Connect provider on Keycloak.
- **Alias:** Arbitrary. For illustrative purposes, we will use `oidc`. `codeberg` could be used as well.
- **Display Name:** Also arbitrary. Here, we will just use `Codeberg`.
All other options can be left untouched. The [_discovery endpoint_](https://codeberg.org/.well-known/openid-configuration) will be used to fetch all metadata required for your Keycloak instance to work together with Codeberg.
You can also optionally enable the [_Proof Key for Code Exchange (PKCE)_](https://docs.gitea.com/next/development/oauth2-provider#supported-oauth2-grants) extension in the _Show metadata_ dropdown menu.
<imgsrc="/assets/images/integrations/keycloak/finish-keycloak-configuration.png"alt="Screenshot of the Identity provider configuration page; it contains all aforementioned configuration options.">
Click on the _Add_/_Save_ button. You will be redirected to the settings of your brand new identity provider. Now, you will be able to use Codeberg to authenticate with the services that you use Keycloak with. Enjoy!