-
frontend/lib/creatorAuth.ts- ✅ Removed
emailfield fromCreatorCredentialsinterface - ✅ Removed all email-related functions (
getCreatorByEmail,isEmailRegistered,sendSecurityKeyEmail) - ✅ Added
getCreatorByUsername()for username-based lookup - ✅ Updated
resetPassword()to use username instead of email - ✅ Security key hashing still works (for upload verification)
- ✅ Removed
-
frontend/app/admin/page.tsx- ✅ Removed
emailfield fromPendingCreatorinterface - ✅ Removed email display from UI
- ✅ Simplified
handleApprove()- no email sending - ✅ Alert shows: "Creator will see key in dashboard after login"
- ✅ Fixed JSX structure errors
- ✅ Removed
File: frontend/app/creator/page.tsx
Remove:
- Email input field
- Email validation
- Email duplicate check
Keep:
- Username (name)
- Organization
- Password
- Wallet address
Remove:
- Security key input field
- Security key verification during login
- "Email or Username" (just "Username")
Keep:
- Username input
- Password input
- Wallet verification
After successful login, check if user is approved:
if (creator.securityKeyHash) {
// User is approved - show notification
showNotification("✅ You're verified! Your Security Key: ABC123XY")
}Banner should:
- Appear at top of dashboard
- Show security key in copyable format
- Be dismissible
- Persist until user copies it
On Upload Tab:
- If not approved: Show "⏳ Awaiting admin approval"
- If approved but no key entered: Show input field "Enter your security key to unlock upload"
- After correct key: Unlock upload for session
Change from:
- Email input → New password
Change to:
- Username input → New password
1. User connects wallet
2. Fills: Username, Organization, Password
3. Clicks "Register"
4. Success: "Registration successful! Awaiting admin approval"
1. User enters: Username + Password
2. Clicks "Login"
3. Logged in successfully
4. Dashboard shows: "⏳ Awaiting admin approval"
5. Upload button is disabled
1. User enters: Username + Password
2. Clicks "Login"
3. Logged in successfully
4. Notification banner appears:
"✅ You're verified! Your Security Key: ABC123XY"
5. User can copy the key
1. User clicks "Upload" tab
2. Sees: "Enter your security key to unlock upload"
3. Enters: "ABC123XY"
4. Upload form unlocks
5. Can now upload content
const [email, setEmail] = useState("");
const [loginIdentifier, setLoginIdentifier] = useState("");
const [isForgotPassword, setIsForgotPassword] = useState(false);const [showNotification, setShowNotification] = useState(false);
const [userSecurityKey, setUserSecurityKey] = useState("");
const [uploadUnlocked, setUploadUnlocked] = useState(false);
const [enteredKey, setEnteredKey] = useState("");// Remove email validation
// Remove isEmailRegistered check
// Just save: name, organization, password, walletAddress// Remove security key verification
// Just verify: username + password
// After login, check if approved and show notificationconst handleUnlockUpload = () => {
if (verifySecurityKey(account!, enteredKey)) {
setUploadUnlocked(true);
alert("✅ Upload unlocked!");
} else {
setError("Invalid security key");
}
};✅ No Email Infrastructure - Works completely offline ✅ Simpler Registration - Just 3 fields (username, org, password) ✅ Easier Login - Just username + password ✅ Better UX - Security key only when needed (upload) ✅ In-App Notifications - No external dependencies ✅ More Secure - Security key required for content creation ✅ Practical - Actually implementable without backend
Would you like me to update frontend/app/creator/page.tsx now to complete the simplified authentication system?
This will involve:
- Removing email from registration
- Removing security key from login
- Adding notification banner
- Adding security key input on upload tab
- Updating forgot password
Let me know and I'll proceed!