shogun-button-react 6.7.3 → 6.8.0
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.
- package/CHANGELOG.md +124 -0
- package/README.md +769 -769
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Version 4.0.0 (Latest)
|
|
4
|
+
|
|
5
|
+
### 💥 Breaking Changes
|
|
6
|
+
- **OAuth Removed**: Removed OAuth authentication support following removal from shogun-core
|
|
7
|
+
- Removed `showOauth` option from `ShogunConnectorOptions`
|
|
8
|
+
- Removed `oauth` configuration from connector options
|
|
9
|
+
- Removed OAuth login/signup methods from button component
|
|
10
|
+
- Removed Google OAuth icon and UI elements
|
|
11
|
+
- Updated `authMethod` type to exclude "oauth"
|
|
12
|
+
|
|
13
|
+
### ✨ New Features
|
|
14
|
+
- **ZK-Proof Authentication**: Added support for anonymous authentication using Zero-Knowledge Proofs
|
|
15
|
+
- New `showZkProof` option to enable/disable ZK-Proof in UI
|
|
16
|
+
- `zkproof` configuration for customizing ZK-Proof settings
|
|
17
|
+
- Login with trapdoor (recovery phrase)
|
|
18
|
+
- Signup generates new anonymous identity with trapdoor
|
|
19
|
+
- Complete anonymity using Semaphore protocol
|
|
20
|
+
- Multi-device support with same trapdoor
|
|
21
|
+
- Added ZK-Proof icon and UI components
|
|
22
|
+
- Added `authMethod: "zkproof"` support
|
|
23
|
+
- Added `seedPhrase` field to `AuthData` interface for trapdoor backup
|
|
24
|
+
|
|
25
|
+
### ⬆️ Dependencies Update
|
|
26
|
+
- **shogun-core**: Updated from `^3.3.8` to `^4.0.0`
|
|
27
|
+
- **rxjs**: Updated from `^7.8.1` to `^7.8.2` (aligned with shogun-core 4.0.0)
|
|
28
|
+
|
|
29
|
+
### 🔄 Migration Guide
|
|
30
|
+
If you were using OAuth authentication:
|
|
31
|
+
- Remove `showOauth` property from your `shogunConnector` configuration
|
|
32
|
+
- Remove `oauth` provider configuration
|
|
33
|
+
- Use alternative authentication methods: Password, MetaMask, WebAuthn, or Nostr
|
|
34
|
+
|
|
35
|
+
For updating from version 3.x:
|
|
36
|
+
- Update dependencies: `yarn upgrade shogun-button-react shogun-core`
|
|
37
|
+
- No API changes required - all existing functionality is maintained
|
|
38
|
+
- Verify compatibility with shogun-core 4.0.0 features
|
|
39
|
+
- New ZK-Proof authentication available (opt-in via `showZkProof: true`)
|
|
40
|
+
|
|
41
|
+
### 📝 New Configuration Options
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
const { core, options } = shogunConnector({
|
|
45
|
+
appName: "My App",
|
|
46
|
+
showZkProof: true, // Enable ZK-Proof authentication
|
|
47
|
+
zkproof: {
|
|
48
|
+
enabled: true,
|
|
49
|
+
defaultGroupId: "my-app-users",
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 🔐 ZK-Proof Authentication Flow
|
|
55
|
+
|
|
56
|
+
**Signup:**
|
|
57
|
+
```typescript
|
|
58
|
+
const result = await signUp("zkproof");
|
|
59
|
+
if (result.success && result.seedPhrase) {
|
|
60
|
+
// User MUST save the seedPhrase (trapdoor)
|
|
61
|
+
console.log("Save this trapdoor:", result.seedPhrase);
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Login:**
|
|
66
|
+
```typescript
|
|
67
|
+
const result = await login("zkproof", savedTrapdoor);
|
|
68
|
+
if (result.success) {
|
|
69
|
+
console.log("Logged in anonymously!");
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Version 1.3.4
|
|
74
|
+
|
|
75
|
+
### 🐛 Bug Fixes
|
|
76
|
+
- **Export Gun Pair Fix**: Fixed issue where "Export Pair" option was not accessible from user dropdown - now works correctly without requiring disconnect
|
|
77
|
+
- **Modal Logic Improvement**: Enhanced modal rendering logic to allow export functionality when user is already authenticated
|
|
78
|
+
- **UX Enhancement**: Improved back button behavior in export modal - now properly closes modal when user is logged in instead of showing unnecessary auth options
|
|
79
|
+
|
|
80
|
+
### 🔧 Technical Changes
|
|
81
|
+
- Modified component render logic to show modal even when user is logged in
|
|
82
|
+
- Improved export form navigation for better user experience
|
|
83
|
+
- Reordered dropdown menu items for better flow (Export Pair before Disconnect)
|
|
84
|
+
|
|
85
|
+
## Version 1.3.3
|
|
86
|
+
|
|
87
|
+
### ✨ New Features
|
|
88
|
+
- **Import Gun Pair Login**: Aggiunta possibilità di effettuare login tramite importazione di un Gun pair esistente
|
|
89
|
+
- **Export Gun Pair**: Funzionalità per esportare il proprio Gun pair con opzione di crittografia tramite password
|
|
90
|
+
- **Improved UX**: Migliorata l'interfaccia utente con feedback visivi e messaggi informativi
|
|
91
|
+
|
|
92
|
+
### 🔧 Improvements
|
|
93
|
+
- **Navigation Fix**: Il toggle "Don't have account? Sign up" ora porta alla selezione dei metodi di autenticazione invece che direttamente al form password
|
|
94
|
+
- **Visual Feedback**: Sostituiti gli alert con feedback visivi eleganti per export/import
|
|
95
|
+
- **Better Icons**: Aggiunte icone SVG personalizzate per import/export
|
|
96
|
+
- **Auto-copy**: L'export del pair viene automaticamente copiato negli appunti (quando supportato dal browser)
|
|
97
|
+
- **Enhanced Security**: Messaggi informativi per guidare l'utente nell'uso sicuro delle funzionalità
|
|
98
|
+
|
|
99
|
+
### 🛠 Technical Changes
|
|
100
|
+
- Rimosso l'uso del metodo `on` non disponibile in ShogunCore
|
|
101
|
+
- Definiti tipi locali per `AuthResult` per compatibilità
|
|
102
|
+
- Migliorata gestione degli stati nel provider
|
|
103
|
+
- Aggiunto reset completo degli stati quando si chiude il modal
|
|
104
|
+
|
|
105
|
+
### 🎨 UI/UX Enhancements
|
|
106
|
+
- Box informativi colorati per import/export
|
|
107
|
+
- Feedback di successo con timer automatico
|
|
108
|
+
- Indicatori di caricamento migliorati
|
|
109
|
+
- Messaggi di fallback per browser senza supporto clipboard
|
|
110
|
+
|
|
111
|
+
## Version 1.3.2
|
|
112
|
+
|
|
113
|
+
### Features
|
|
114
|
+
- Basic Gun pair export/import functionality
|
|
115
|
+
- Multi-authentication support (Password, MetaMask, WebAuthn, Nostr, OAuth)
|
|
116
|
+
- Dark mode support
|
|
117
|
+
- Responsive design
|
|
118
|
+
|
|
119
|
+
## Version 1.3.1
|
|
120
|
+
|
|
121
|
+
### Features
|
|
122
|
+
- Initial release
|
|
123
|
+
- Basic authentication flow
|
|
124
|
+
- Provider integration
|