mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
fix: Improve Google Drive API credentials validation and error handling
This commit is contained in:
@@ -6,7 +6,10 @@ const SCOPE = ['https://www.googleapis.com/auth/drive.readonly'];
|
||||
// Validate required credentials
|
||||
const validateCredentials = () => {
|
||||
if (!API_KEY || !CLIENT_ID) {
|
||||
throw new Error('Google Drive API credentials not configured. Please set VITE_GOOGLE_API_KEY and VITE_GOOGLE_CLIENT_ID environment variables.');
|
||||
throw new Error('Google Drive API credentials not configured');
|
||||
}
|
||||
if (API_KEY === 'your-api-key' || CLIENT_ID === 'your-client-id') {
|
||||
throw new Error('Please configure valid Google Drive API credentials');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user