# Public client with resource owner password credentials flow

**URL:** <https://forum.keycloak.org/t/public-client-with-resource-owner-password-credentials-flow/13879>\
**Category:** Getting advice\
**Tags:** authentication, oidc\
**Created:** [February 25, 2022, 11:23am UTC](https://forum.keycloak.org/t/public-client-with-resource-owner-password-credentials-flow/13879 "2022-02-25T11:23:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![timo1](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@timo1](https://forum.keycloak.org/u/timo1)\
**Post date:** [February 25, 2022, 11:23am UTC](https://forum.keycloak.org/t/public-client-with-resource-owner-password-credentials-flow/13879/1 "2022-02-25T11:23:16Z")

</div>

I would like to use a public client with resource owner password credentials. I have enabled Direct Access Grants. The flow doesn’t seem to work for me without client\_secret. I’m getting the following error when requesting token with username, password, grant\_type and client\_id

```auto
{
    "error": "invalid_client",
    "error_description": "INVALID_CREDENTIALS: Invalid client credentials"
}

```

kubernetes logs telling me

```auto
08:41:16,538 WARN [org.keycloak.events] (default task-270) type=LOGIN_ERROR, realmId=master, clientId=kong, userId=null, ipAddress=xx.xx.xx.xxx, error=invalid_client_credentials, grant_type=password

```

With confidential client and client secret my token requests with username, password, grant\_type, client\_id and client\_secret are working. Is it supposed to work this way or should I change some settings when using public client?
