Hi, I’m new on Ionic and I’m building my first app, I’m trying to use routeguards to keep some routes secure the problem is than I store the token on localstorage And when a user Is logged in and open the app the dashboard page loads before than get token can resolve then the user is redirected to login page but when he arrives there the local storage is already resolve and the is redirected again to dashboard
Is there some way to load the local storage before the app starts or at least before than the first route try to use the route guard? Is there another better way to secure my routes? Could you please pint me in the right direction on this.
By the way I’m using Ionic 6, Angular and Capacitor 2