When I call socialAuthService.signOut(). The service's user property isn't cleared. Is that expected behavior?
The reason I ask is because I have a login component that subscribes to authState which works great. I also have a logout component that routes back to the login component.
The issue I'm running into is that when the login component is re initialized when routed to from logout, the authservice still thinks the user is logged in and is firing my code to load the post login UI for the user (when they should remain logged out). The autologin flag is set to false BTW.
I have registered the providers in one place (app.module.ts) and subscrbing to the service solely in the login component.
My workaround has been to detect that the login page was reached via a logout reroute and doing a location.reload to clear the service (which is hacky as hell)>. I tried unsubscribing from the autservice but that didn't work.
I'm on 2.0.0
When I call socialAuthService.signOut(). The service's user property isn't cleared. Is that expected behavior?
The reason I ask is because I have a login component that subscribes to authState which works great. I also have a logout component that routes back to the login component.
The issue I'm running into is that when the login component is re initialized when routed to from logout, the authservice still thinks the user is logged in and is firing my code to load the post login UI for the user (when they should remain logged out). The autologin flag is set to false BTW.
I have registered the providers in one place (app.module.ts) and subscrbing to the service solely in the login component.
My workaround has been to detect that the login page was reached via a logout reroute and doing a location.reload to clear the service (which is hacky as hell)>. I tried unsubscribing from the autservice but that didn't work.
Thanks