Xamarin Forms: Keycloak Integration

I am trying to integrate the Keycloak authentication into my Xamairn forms mobile app. I have created a simple mobile app with a login form.

I need to do below things when login:

  1. After logging in on the mobile app, show the Keycloak login page on a web browser page inside the app.
  2. Login on keycloak web (inside the app) and get the JWT token.
  3. Call any other REST API using the JWT token.

I researched a lot about this but didn’t get anything useful. I found an almost similar thread here, but it is for Flutter.

Also, I found a Keycloak package, ‘Owin.Security.Keycloak’. Using this, can we do the authentication?