Customizing The Auth Widget
Last updated
Last updated
The plugin comes with a convenient KronosUserAuthWidget
class that you can use to create your own authentication widget.
First, create a blueprint from the KronosUserAuthWidget
class. The blueprint will turn into a widget that you can edit in Unreal.
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 has an in-depth example for a custom auth widget.
Once you have your custom authentication widget, you will need to open your KronosUserManager
blueprint and change the "Auth Widget Class".