mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-03-20 15:41:40 -04:00
Fix login flow (#771)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user