Open Braga-source opened 2 months ago
It looks like the issue you're encountering with authentication when trying to create a brain in the Quivr application is likely due to one of several potential misconfigurations or mismatches in your setup. Here's what you should check and adjust to resolve the problem:
Environment Variable Configuration: Ensure the NEXT_PUBLIC_AUTH_MODES
is correctly set to include all intended authentication modes. This variable controls which authentication methods are available, such as password, magic link, and Google SSO.
Authentication Mode Support: Verify that the authentication mode you're trying to use is enabled and supported. If you're using a mode that's not listed in NEXT_PUBLIC_AUTH_MODES
, authentication will fail.
Supabase Integration: Double-check your Supabase setup, including API keys and redirect URIs for SSO. Incorrect configuration here can prevent successful authentication.
Frontend and Backend Consistency: Make sure that the authentication modes expected by the backend align with those enabled in the frontend. Any mismatch can lead to issues.
For more detailed troubleshooting, consider reviewing the code in backend/modules/brain/service/brain_authorization_service.py and frontend/lib/hooks/useAuthModes.ts.
If these steps don't resolve the issue, providing more specific error messages or logs could help pinpoint the exact problem.
@dosu-bot
"It was done the alterations that were suggested but the problem persists. Configuration of the .env file:"
docker-compose.yml
file to configure the stack.OPENAI_API_KEY=sk-voCNLgel8xcjYElMaU1qT3
########
########
NEXT_PUBLIC_ENV=local NEXT_PUBLIC_BACKEND_URL=http://localhost:5050 NEXT_PUBLIC_SUPABASE_URL=http://localhost:54321 NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 NEXT_PUBLIC_CMS_URL=https://cms.quivr.app NEXT_PUBLIC_FRONTEND_URL=http://localhost:* NEXT_PUBLIC_AUTH_MODES=magic_link,google_sso,password
########
########
SUPABASE_URL=http://host.docker.internal:54321 SUPABASE_SERVICE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU PG_DATABASE_URL=notimplementedyet ANTHROPIC_API_KEY=null JWT_SECRET_KEY=super-secret-jwt-token-with-at-least-32-characters-long AUTHENTICATE=true TELEMETRY_ENABLED=true CELERY_BROKER_URL=redis://redis:6379/0 CELEBRY_BROKER_QUEUE_NAME=quivr-preview.fifo QUIVR_DOMAIN=http://localhost:3000/
Given the detailed configuration you've shared and the persistent "Not authenticated" error, it seems the issue might still be related to the authentication process, despite the correct setup in your .env
file. Here are some targeted steps to troubleshoot and potentially resolve the issue:
Verify Supabase Service Key and URL: Double-check that the SUPABASE_SERVICE_KEY
and SUPABASE_URL
are correct and match the details in your Supabase project settings. These are crucial for backend communication with Supabase.
Ensure Environment Variables Are Loaded: Confirm that your application is correctly loading the environment variables. Sometimes, issues in loading .env
files can lead to authentication failures due to missing or incorrect configurations.
Review Authentication Logic: Since the error occurs when attempting to create a brain, which requires authentication, closely examine the authentication logic in your application. This includes how tokens are handled, ensuring they're valid and not expired.
Debugging and Error Logging: Enhance error handling and logging around the authentication process. This can provide clearer insights into what might be going wrong during the authentication phase.
Check for Service Disruptions: Ensure there are no issues or outages with the authentication service you're using (e.g., Supabase) that might be affecting authentication operations.
If these steps do not resolve the issue, consider providing more specific error messages or logs from the authentication process. This additional information could be crucial in pinpointing the exact cause of the authentication failure.
To continue the conversation, mention @dosu.
Hey my friend, can you try to git pull and rerun the docker compose up
?
Or else, follow this procedure if on your own vps: https://docs.quivr.app/deployment/digital_ocean
What happened?
It was expected that the Quivr application would function correctly, but with the errors, it is not possible to create brains, for example.
Relevant log output
Twitter / LinkedIn details
No response