Skip to content

Commit 8824238

Browse files
Clément VALENTINclaude
andcommitted
feat(web): mask client_secret and update warning message
- Client secret is now hidden by default with show/hide toggle - Updated warning message to clarify that client secret can be regenerated from account settings if lost 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent bbb2256 commit 8824238

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

apps/web/src/pages/Signup.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export default function Signup() {
5252
const [turnstileError, setTurnstileError] = useState(false)
5353
const [credentials, setCredentials] = useState<{ client_id: string; client_secret: string } | null>(null)
5454
const [copied, setCopied] = useState<'id' | 'secret' | null>(null)
55+
const [showSecret, setShowSecret] = useState(false)
5556
const { signup, signupLoading, signupError } = useAuth()
5657

5758
const TURNSTILE_SITE_KEY = import.meta.env.VITE_TURNSTILE_SITE_KEY
@@ -178,7 +179,7 @@ export default function Signup() {
178179
<div className="space-y-4">
179180
<div className="p-4 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
180181
<p className="text-sm text-yellow-800 dark:text-yellow-200 font-medium">
181-
⚠️ Important : Sauvegardez ces identifiants maintenant. Ils ne seront plus affichés.
182+
⚠️ Important : Sauvegardez ces identifiants maintenant. Le Client Secret ne sera plus affichable, mais vous pourrez en générer un nouveau depuis votre compte.
182183
</p>
183184
</div>
184185

@@ -205,11 +206,18 @@ export default function Signup() {
205206
<label className="block text-sm font-medium mb-2 text-gray-900 dark:text-white">Client Secret</label>
206207
<div className="flex gap-2">
207208
<input
208-
type="text"
209+
type={showSecret ? 'text' : 'password'}
209210
value={credentials.client_secret}
210211
readOnly
211212
className="input flex-1"
212213
/>
214+
<button
215+
onClick={() => setShowSecret(!showSecret)}
216+
className="btn btn-secondary"
217+
title={showSecret ? 'Masquer' : 'Afficher'}
218+
>
219+
{showSecret ? <EyeOff size={20} /> : <Eye size={20} />}
220+
</button>
213221
<button
214222
onClick={() => copyToClipboard(credentials.client_secret, 'secret')}
215223
className="btn btn-secondary"

0 commit comments

Comments
 (0)