fix: reset github token when authentication failed (#388)
This commit is contained in:
@@ -69,6 +69,7 @@ export class TokenDialog extends React.Component<TokenDialogProps, TokenDialogSt
|
||||
} catch (error) {
|
||||
console.warn(`Authenticating against GitHub failed`, error);
|
||||
this.setState({ verifying: false, error: true });
|
||||
this.props.appState.gitHubToken = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ describe('TokenDialog component', () => {
|
||||
await instance.onSubmitToken();
|
||||
|
||||
expect(wrapper.state('error')).toBe(true);
|
||||
expect(store.gitHubToken).toEqual(null);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user