Keycloak: how to log in a user through the API

I managed to log in as admin through the /protocol/openid-connect/token url.

Now I have an admin that can list users, realms + create/delete them etc.

What I would like is to check if the credentials I receive from my user are the good ones or not.

When I use the same call than for the admin /protocol/openid-connect/token I get “bad credentials” but I know they are correct.

I am using nextjs + @keycloak/keycloak-admin-client but looks like the keycloak-admin-client cannot handle user authentication