How to resolve Keycloak Setup Error - "UNIQUE constraint failed: auth_user.username"

I am setting up keycloak for a django project and this is the error I receive:


It looks like when I log in, keycloak tries to create my user again, even though my user is in the database.

Also, my usernames are hashed in the auth_user table in the database.

This is my code in my

    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',

I also tried setting the OIDC_CREATE_USER setting to False but that only prevented django from from detecting login sessions (which still were created properly).

Any ideas on what is going wrong and how I can fix it?