Fix login flow (#771)

This commit is contained in:
Leendert de Borst
2025-04-23 18:57:08 +02:00
parent 951f80b4bb
commit 1bf6a5dec3
3 changed files with 4 additions and 2 deletions

View File

@@ -89,7 +89,6 @@ export default function LoginScreen() {
const loginResponse = await srpUtil.initiateLogin(credentials.username);
// Use requestAnimationFrame to ensure UI updates are smooth
const passwordHash = await EncryptionUtility.deriveKeyFromPassword(
credentials.password,
loginResponse.salt,

View File

@@ -13,7 +13,7 @@ import { SrpUtility } from '@/utils/SrpUtility';
import { useWebApi } from '@/context/WebApiContext';
export default function UnlockScreen() {
const { isLoggedIn, username, isFaceIDEnabled, returnPath } = useAuth();
const { isLoggedIn, username, isFaceIDEnabled } = useAuth();
const { testDatabaseConnection } = useDb();
const [password, setPassword] = useState('');
const [isLoading, setIsLoading] = useState(false);

View File

@@ -57,6 +57,9 @@ export const DbProvider: React.FC<{ children: React.ReactNode }> = ({ children }
metadata
);
// Initialize the database in the native module
await unlockVault();
setDbInitialized(true);
setDbAvailable(true);
}, []);