Security: remove hardcoded credentials, require DB_PASSWORD, delete .bak file, warn on secrets template
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+1
-10
@@ -18,17 +18,8 @@ export function useAuth() {
|
||||
}, []);
|
||||
|
||||
const login = useCallback((username: string, password: string): boolean => {
|
||||
// TODO: Implement server-side authentication via API call
|
||||
if (typeof window === 'undefined') return false;
|
||||
if (username === 'admin' && password === 'admin') {
|
||||
localStorage.setItem(ROLE_KEY, 'admin');
|
||||
setRole('admin');
|
||||
return true;
|
||||
}
|
||||
if (username === 'user' && password === 'user') {
|
||||
localStorage.setItem(ROLE_KEY, 'user');
|
||||
setRole('user');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user