Auth
onAuthStateChanged()
Use nhost.auth.onAuthStateChanged
to add a custom function that runs every time the authentication status of the user changes. E.g. add a custom function that runs every time the authentication status changes from signed-in to signed-out.
Parameters
fn required AuthChangedFunction