angular-auth-oidc-client icon indicating copy to clipboard operation
angular-auth-oidc-client copied to clipboard

Add A Sample To Documentation for Refresh Tokens in Mobile Angular and/or Cordova

Open wolfpackt99 opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe. I am following this article Securing a Cordova App

Describe the solution you'd like The library has changed and would like to see a best-practice or how-to documentation for mobile. seems the checkAuth needs to behave differently and am not entirely sure how to update/change a guard to behave if we have a custom checkAuth.

Describe alternatives you've considered No other libraries. Custom guards but need access to methods that were previously exposed in v11 (via AuthStateService)

wolfpackt99 avatar Oct 22 '21 15:10 wolfpackt99

Hey, basically the article describes the way a cordova app would handle the auth request. You need to a custom URL scheme to redirect into your app after the redirect from the sts. In addition to that, you need to pass the url to the checkAuth() method. That is the key points for cordova.

FabianGosebrink avatar Oct 23 '21 15:10 FabianGosebrink

I have everything working now, just unsure if i should be using a custom guard or still use the default provided guards.

wolfpackt99 avatar Nov 08 '21 14:11 wolfpackt99

I have added a working example here https://github.com/FabianGosebrink/cordova-angular-oauth2-oidc. Also added to the docs Mobile Sample using Cordova

FabianGosebrink avatar Mar 13 '22 17:03 FabianGosebrink