import { useState } from 'react'; import axios from '../services/api'; const sectionBox = { marginTop: '12px', padding: '14px', background: 'var(--surface-2)', border: '1px solid var(--border)', borderRadius: '12px', }; function JwtDecoderTool() { const [input, setInput] = useState(''); const [decoded, setDecoded] = useState(null); const [error, setError] = useState(''); const handleDecode = async () => { setError(''); setDecoded(null); try { const res = await axios.post('/api/jwt/decode', { token: input }); setDecoded(res.data); } catch (err) { setError(err.response?.data?.message || 'Ungültiger JWT'); } }; return (
Hinweis: Dieser Decoder verifiziert keine Signatur – nur zur Analyse.