KeyCloak login with Google in Flutter/Android app

2.4k Views Asked by At

I am working on a Flutter app, which uses KeyCloak for Authorization in the backend. Login with username and password is implemented. I want to implement login with Google. Do anyone know, which KeyCloak endpoint and parameters are used for Google/Facebook/etc login? By the way, I have already added google in my KeyCloak configuration, and I have also set up the app on Google console. Client id, client secret are also added.

1

There are 1 best solutions below

0
Naveed Jamali On

I've solved my issue using this plugin: https://pub.dev/packages/openid_client

This plugin opens the KeyCloak's user authentication webpage in the webview/browser. Once, the user finishes login or signup, the webview/browser returns the user credentials including the access token to the app, which is useful for making API requests e.g. to fetch user profile, etc.