Securing react-native mobile app using api endpoints, not redirection

A complete beginner here, I am wondering if I can use some sort of API to authenticate rather than redirecting to a keycloak page, then back to application.
I’ve found that there are a list of OIDC endpoints that are listed for keycloak, but I’m unsure as to what can/needs to be sent to them, and which can be used to secure a resource, as well as, what to do with the response/what even is the response format. (Found at /auth/realms/{realm}/.well-known/openid-configuration)

Essentially, is there some way to use my own login page and when hitting a login button it will send a request, for example, a username and password, to an endpoint, then get back a response indicating whether it’s ok or not and based on that response, proceed to the protected resource (let’s say a dashboard screen). The documentation provided seems insufficient or simply hard to understand.

I’m unsure whether this is even possible, although I’m thinking it should be, and assuming that’s the case, I’m sure there may be more intermediary steps, but any guidance outside of “just look it up” would be very great. I have very little experience with authentication and particularly with keycloak itself so honestly, even finding correct search terms would be pretty far out of my reach.

If this strategy is possible, the follow up question would be whether you can log out, and register new users using a similar method.