Introduction
Guarding routes is a very common topic amongst mobile developers.
The problem can be boiled down to the following question...
For further actions, you may consider blocking this person and/or reporting abuse
It doesn't work with logout - currentUserProvider doesn't watches. If I watch it - than it mess with initial location
It works with logout, but it depends on how your router looks. This is not a one-size-fits-all solution. You should adapt it to your router.
Where is ProviderLogger() defined?
In another file, it's irrelevant for this tutorial. If you need to run the code, delete the line.