'Ionic: Redirect Android app after keycloak login

I have an ionic 6 app (using capacitor 3) and i am using Keycloak as authentication provider. My current keycloak version is V 14.0.0. When i test the web version of the web all is working fine, but when i move to Android i can`t redirect to the app when the user make the keycloak login.

This is my KeyCloak client config: keycloakconfig

I have already set up the deep links in android manifest:

        <intent-filter>

            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="http://bec02:8080/auth/" android:host="com.test.kctestapp"/>
        </intent-filter>

But once authenticated the page cant be found:

pagenotfounderror

What can i be doing wrong? Thank you.



Solution 1:[1]

Try using following redirectUrl in your case both in Keycloak config and Application redirectUrl parameter:

com.test.kctestapp://

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 milan.sangani