nhost.auth.isAuthenticated to check if the user is authenticated or not.
Note: nhost.auth.isAuthenticated() can return false for two reasons:
- The user is not authenticated
- The user is not authenticated but might be authenticated soon (loading) because there is a network request in transit.
nhost.auth.getAuthenticationStatus to get both authentication and loading status.