import React, { useState } from 'react'; import { motion } from 'framer-motion'; import { authService } from '../services/auth'; import '../styles/Login.css'; interface LoginProps { onLogin: (did: string, handle: string) => void; onClose: () => void; } export const Login: React.FC = ({ onLogin, onClose }) => { const [identifier, setIdentifier] = useState(''); const [password, setPassword] = useState(''); const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(null); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setError(null); setIsLoading(true); try { const response = await authService.login(identifier, password); onLogin(response.did, response.handle); } catch (err) { setError('ログインに失敗しました。認証情報を確認してください。'); } finally { setIsLoading(false); } }; return ( e.stopPropagation()} >

atprotoログイン

setIdentifier(e.target.value)} placeholder="your.handle または did:plc:..." required disabled={isLoading} />
setPassword(e.target.value)} placeholder="アプリパスワード" required disabled={isLoading} /> メインパスワードではなく、 アプリパスワード を使用してください
{error && (
{error}
)}

ai.cardはatprotoアカウントを使用します。 データはあなたのPDSに保存されます。

); };