^new^ | Scoreland Passwords
const handleRetrievePassword = async () => { try { const response = await axios.post("http://localhost:5000/retrieve_password", { user_id: 1, account_name: accountName, master_password: masterPassword, }); console.log(response.data); } catch (error) { console.error(error); } };
return ( <div> <h1>ScoreLand Password Manager</h1> <input type="number" value={passwordLength} onChange={(e) => setPasswordLength(e.target.value)} placeholder="Password length" /> <button onClick={handleGeneratePassword}>Generate Password</button> <p>Generated Password: {generatedPassword}</p> <input type="text" value={accountName} onChange={(e) => setAccountName(e.target.value)} placeholder="Account name" /> <button onClick={handleStorePassword}>Store Password</button> <input type="password" value={masterPassword} onChange={(e) => setMasterPassword(e.target.value)} placeholder="Master password" /> <button onClick={handleRetrievePassword}>Retrieve Password</button> </div> ); } scoreland passwords
class User(db.Model): id = db.Column(db.Integer, primary_key=True) master_password = db.Column(db.String(128), nullable=False) const handleRetrievePassword = async () => { try
app = Flask(__name__) app.config["SQLALCHEMY_DATABASE_URI"] = "postgresql://user:password@host:port/dbname" db = SQLAlchemy(app) const handleRetrievePassword = async () =>