isAuthenticatedAsync()
Use nhost.auth.isAuthenticatedAsync
to wait (await) for any internal authentication network requests to finish and then return the authentication status.
const isAuthenticated = await nhost.auth.isAuthenticatedAsync()
if (isAuthenticated) {
console.log('User is authenticated')
}