# Customizing The Auth Widget

The plugin comes with a convenient `KronosUserAuthWidget` class that you can use to create your own authentication widget.

## Creating The Auth Widget

First, create a blueprint from the `KronosUserAuthWidget` class. The blueprint will turn into a widget that you can edit in Unreal.

<figure><img src="/files/i0Gcxfpop57Lq1DJrnsu" alt=""><figcaption></figcaption></figure>

You can customize the widget in any way you want. There are no hard requirements. You will most likely want to have at least one Text that will be used to display the current authentication state. You can use the following events to update parts of your widget (e.g. the auth state text):

* `OnUserAuthStarted`: Event when user authentication is started.
* `OnUserAuthStateChanged`: Event when user authentication state is changed.
* `OnUserAuthComplete`: Event when user authentication is complete.

In case **authentication fails** make sure that you give the user a way to retry authentication such as displaying a button, or awaiting an input prompt. The [**Sample Project**](/kronos-matchmaking/examples/sample-project.md) has an in-depth example for a custom auth widget.

## Overriding The Auth Widget

Once you have your custom authentication widget, you will need to open your `KronosUserManager` blueprint and change the "Auth Widget Class".


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://horizongames.gitbook.io/kronos-matchmaking/usage/authentication/customizing-the-auth-widget.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
