oktadev/schematics

Ionic Capacitor AuthGuard IsAuthenticated False On App Launch

zlannin opened this issue · 1 comments

When my app launches my homepage has an AuthGuard that redirects to the login. After the upgrade when my homepage AuthGuard is ran the auth.session.isAuthenticated is always false until the token is loaded from storage. This causes users to redirect to the login screen for about a second, then they get redirected again to the homepage. What is the recommend way to fetch the token from storage before my AuthGuard is ran?

You'll likely get better support from the Ionic AppAuth project. I'd suggest asking your question there. I only implemented their examples as templates in this project.