How can i completely skip the signup/login page when the user loads the app. So if there is a user session object it takes them straight to the tabs page.
I thought about adding in the constructor of the signup page a check to see if the session object exists, if it does redirect to diff page, but seems kind of inefficient.
What do you mean by “session object” ?
If you store something in localstorage (or elsewhere) after login/signup that indicates that the user is logged in you can do something like this in the app.component:
So i have tried to implement this, injected my auth provider in the consutrctor of app.components.
Then on the platform.ready i check to see if there is a user (later i will redirect if found). but when i console log that user i get undefined. There is deffi a user session object as i can see that in google chrome.
Ok i don’t really have an exact answer for your question but this is what i think. When you inject your service to the component the constructor function runs in your case it set the properties asynchronously and you rely that this operation will be resolved before your method get’s called maybe i am totally wrong here but i wouldn’t rely on that, i prefer my approach. Now if you want to stick with yours maybe try a singleton approach for the auth class, i think the way to do it is to define the class in the app.module.ts file
I agree with @wingly on the cause of the problem. This is precisely why I do my best to avoid storing raw data in service providers. See this discussion for more backstory and alternatives.