I'm trying to use angular-auth-oidc-client in an Android Ionic-Angular app authenticating against MS Identity server.
Versions:
angular-auth-oidc-client11.1.4@angular10.0.2@ionic/angular5.2.3
Capacitor platform: Android
Where I am:
- Authentication is successful when running plain web app (from desktop browser)
- An intentent filter is declared in android manifest and the app correctly opens when authorization-server redirects to my-app://login-callback (real Android device).
- Using Deeplinks plugin, I can intercept calls to the login callback and can read the query-string containing code, scope, state and session_state params.
What to do next? The authentication remains false. What should I call with the callback queryString?
I found this CallBackService which seems to match my need but is unfortunately not part of the lib public API :/
Please note this solution works with refresh-token only (set
useRefreshToken: truein conf). I couldn't get it work properly usingsilentRenewUrl(yet?)First, the AppComponent:
Now, the UAA service I use to turn Keycloak ID tokens into user objects. Actual initialisation occurs in
onBackOnline():And this is the conf I use (note
eagerLoadAuthWellKnownEndpointsanduseRefreshToken):