Skip to content

Commit

Permalink
Fix bug where DOB persisted between users
Browse files Browse the repository at this point in the history
  • Loading branch information
navzam committed Jul 14, 2024
1 parent b1ae8fa commit 8410597
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class LoginPage extends React.Component<Props, State> {
});
} else {
console.log('onAuthStateChanged without user');
this.setState({ loggedIn: false, authenticating: false, initialAuthLoaded: true });
this.setState({ loggedIn: false, initialAuthLoaded: true, authenticating: false, userConsent: undefined });
}
});
};
Expand Down Expand Up @@ -291,7 +291,7 @@ class LoginPage extends React.Component<Props, State> {

private setUserConsentForNewUser = (userId: string): Promise<UserConsent> => {
const nextUserConsent: UserConsent = {
...this.state.userConsent,
dateOfBirth: undefined,
legalAcceptance: {
state: LegalAcceptance.State.NotStarted,
version: 1,
Expand Down

0 comments on commit 8410597

Please sign in to comment.