nextjs-redux-firebase-authentication
nextjs-redux-firebase-authentication copied to clipboard
Account Page Crashes On Signout
Expected Behavior
Account Page should redirect to sign in page when sign out button is clicked.
Current Behavior
Signing out from the account page causes the app to crash.
Possible Solution
Checking to see if the authUser is null and if it is returning null instead of the component.
Steps to Reproduce
- Sign in
- Navigate to Account Page
- Sign out
- App crashed authUser.email undefined.
const AccountPage = ({ authUser }) => {
if ( null === authUser ) {
return null;
}
return (
<AppWithAuthorization>
<h1>Account: {authUser.email}</h1>
<PasswordForgetForm />
<PasswordChangeForm />
</AppWithAuthorization>
);
};