Skip to main content
Glama
test-oauth-login.cjs1.76 kB
#!/usr/bin/env node /** * Test OAuth login flow with actual user credentials */ const axios = require('axios'); const { UmbrellaDualAuth } = require('../../dist/dual-auth.js'); async function testOAuthLogin() { // User credentials const username = 'david+saola@umbrellacost.com'; const password = 'Dsamsung1!'; console.log('\n🔐 Testing OAuth Login with User Credentials'); console.log('=' .repeat(60)); console.log(`Username: ${username}`); console.log(`Password: ${'*'.repeat(password.length)}`); console.log('=' .repeat(60)); // Test 1: Test DualAuth directly console.log('\n1️⃣ Testing DualAuth class directly:'); try { const dualAuth = new UmbrellaDualAuth('https://api.umbrellacost.io/api/v1'); const authResult = await dualAuth.authenticate({ username, password }); console.log('✅ DualAuth authentication successful!'); console.log('Auth tokens:', { Authorization: authResult.Authorization ? 'Present' : 'Missing', apikey: authResult.apikey ? 'Present' : 'Missing' }); return true; } catch (error) { console.log('❌ DualAuth failed:', error.response?.status || error.message); if (error.response?.data) { console.log('Error details:', JSON.stringify(error.response.data, null, 2)); } return false; } } // Run the test testOAuthLogin().then(success => { console.log('\n' + '=' .repeat(60)); if (success) { console.log('✅ Authentication works! OAuth server should accept these credentials.'); } else { console.log('❌ Authentication still failing. Need to check credentials or API endpoints.'); } process.exit(success ? 0 : 1); }).catch(err => { console.error('Unexpected error:', err); process.exit(1); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/daviddraiumbrella/invoice-monitoring'

If you have feedback or need assistance with the MCP directory API, please join our Discord server