bitty-tui 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -59,6 +59,9 @@ export function LoginView({ onLogin }) {
59
59
  }
60
60
  if (data.TwoFactorProviders) {
61
61
  const providers = data.TwoFactorProviders;
62
+ if (mfaParams) {
63
+ showStatusMessage("Invalid MFA code, please try again.", "error");
64
+ }
62
65
  if (providers.length === 1) {
63
66
  setMfaParams({
64
67
  twoFactorProvider: providers[0],
@@ -67,9 +70,13 @@ export function LoginView({ onLogin }) {
67
70
  else if (providers.length > 1) {
68
71
  setAskMfa(providers);
69
72
  }
73
+ return;
70
74
  }
71
75
  else if (data.TwoFactorProviders2) {
72
76
  const providers = Object.keys(data.TwoFactorProviders2);
77
+ if (mfaParams) {
78
+ showStatusMessage("Invalid MFA code, please try again.", "error");
79
+ }
73
80
  if (providers.length === 1) {
74
81
  setMfaParams({
75
82
  twoFactorProvider: providers[0],
@@ -78,6 +85,7 @@ export function LoginView({ onLogin }) {
78
85
  else if (providers.length > 1) {
79
86
  setAskMfa(providers);
80
87
  }
88
+ return;
81
89
  }
82
90
  }
83
91
  else {
@@ -162,7 +170,7 @@ export function LoginView({ onLogin }) {
162
170
  showStatusMessage("Failed to resend MFA code.", "error");
163
171
  });
164
172
  setResendTimeout(30);
165
- }, children: "Resend Code" }))] })) : (_jsxs(Box, { flexDirection: "column", width: "50%", children: [_jsx(TextInput, { placeholder: "Server URL", value: url, onChange: setUrl }), _jsx(TextInput, { autoFocus: true, placeholder: "Email address", value: email, onChange: setEmail }), _jsx(TextInput, { placeholder: "Master password", value: password, onChange: setPassword, onSubmit: () => {
173
+ }, children: "Resend Code" })), statusMessage && (_jsx(Box, { marginTop: 1, width: "100%", justifyContent: "center", children: _jsx(Text, { color: statusMessageColor, children: statusMessage }) }))] })) : (_jsxs(Box, { flexDirection: "column", width: "50%", children: [_jsx(TextInput, { placeholder: "Server URL", value: url, onChange: setUrl }), _jsx(TextInput, { autoFocus: true, placeholder: "Email address", value: email, onChange: setEmail }), _jsx(TextInput, { placeholder: "Master password", value: password, onChange: setPassword, onSubmit: () => {
166
174
  if (email?.length && password?.length) {
167
175
  handleLogin();
168
176
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitty-tui",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "license": "MIT",
5
5
  "repository": "https://github.com/mceck/bitty",
6
6
  "keywords": [
@@ -31,9 +31,9 @@
31
31
  "dependencies": {
32
32
  "argon2": "^0.44.0",
33
33
  "chalk": "^5.6.2",
34
- "clipboardy": "^4.0.0",
34
+ "clipboardy": "^5.3.1",
35
35
  "ink": "^6.3.0",
36
- "otplib": "^12.0.1",
36
+ "otplib": "^13.3.0",
37
37
  "react": "^19.1.0",
38
38
  "read-package-up": "^12.0.0"
39
39
  },
package/readme.md CHANGED
@@ -23,12 +23,6 @@ Works also with Vaultwarden.
23
23
 
24
24
  If you check "Remember me" during login, your vault encryption keys will be stored in plain text in your home folder (`$HOME/.config/bitty/config.json`). Use this option only if you are the only user of your machine.
25
25
 
26
- ## TODO
27
-
28
- - Collections support
29
- - Test Fido, Duo MFA support
30
- - Handle more fields editing
31
- - Handle creating different cipher types
32
26
 
33
27
  ## Acknowledgments
34
28
  - [Bitwarden whitepaper](https://bitwarden.com/help/bitwarden-security-white-paper)