Minor Changes
-
39df4d5: Deprecate
useAuthLoadingand introduceuseAuthenticationStatus
When using bothuseAuthLoadinganduseAuthenticatedtogether, the hooks rerender independently from each other.
As a result, when a user loads the page while he previously authenticated, the hooks values were chronologically:isLoading isAuthenticated truefalsefalsefalsefalsetrueThe intermediate (
false,false) is incorrect and is causing issues when using an authentication gate.It is therefore recommended to stop using
useAuthLoading, and to useuseAuthenticationStatusinstead, in order to keep the loading state and the authentication in sync within the same hook.Usage:
const { isLoading, isAuthenticated } = useAuthenticationStatus()
Fixes this issue