Giter Club home page Giter Club logo

Comments (4)

dosubot avatar dosubot commented on May 26, 2024 3

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:

  1. 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.

  2. 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.

  3. Supabase Integration: Double-check your Supabase setup, including API keys and redirect URIs for SSO. Incorrect configuration here can prevent successful authentication.

  4. 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.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

from quivr.

dosubot avatar dosubot commented on May 26, 2024 2

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

from quivr.

Braga-source avatar Braga-source commented on May 26, 2024

@dosu-bot

"It was done the alterations that were suggested but the problem persists.
Configuration of the .env file:"

QUIVR Configuration

This file is used to configure the Quivr stack. It is used by the docker-compose.yml file to configure the stack.

OPENAI. Update this to use your API key. To skip OpenAI integration use a fake key, for example: tk-aabbccddAABBCCDDEeFfGgHhIiJKLmnopjklMNOPqQqQqQqQ

OPENAI_API_KEY=sk-voCNLgel8xcjYElMaU1qT3

LOCAL

OLLAMA_API_BASE_URL=http://host.docker.internal:11434 # Uncomment to activate ollama. This is the local url for the ollama api

########

FRONTEND

########

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

########

BACKEND

########

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/

from quivr.

StanGirard avatar StanGirard commented on May 26, 2024

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

from quivr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.