Skip to content

Local Development server #341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
amirshaneh opened this issue Mar 29, 2025 · 2 comments
Open

Local Development server #341

amirshaneh opened this issue Mar 29, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@amirshaneh
Copy link

I've followed the quick start steps to run a local server.
I guess its also missing setting up POSTGRES_PASSWORD in .postgres env, since it cannot be empty (won't run without it) and also DJANGO_SECRET_KEY in .django env. but even after everything is up and running.
I'm able to login using admin credentials but whenever I'm trying to create anything (corpus doc etc..) i get the following error from the graphql request. "You do not have permission to perform this action".

I've accessed django admin panel and double checked all my user permission and so on...

any suggestion on how to resolve this issue?

@amirshaneh
Copy link
Author

@JSv4 after some tinkering about I found the issue and would like to know if its a valid issue for local development.
in config/settings/base.py the current code only sets JSONWebTokenMiddleware to GRAPHENE_MIDDLEWARE if USE_AUTH0.
if I always add JSONWebTokenMiddleware it seems to be working as expected...

@JSv4
Copy link
Owner

JSv4 commented Apr 2, 2025

Hey @amirshaneh, I ran into similar issue that is being fixed in pending PR (expected merge in a few days max). For starters, make sure USE_API_KEY_AUTH is set to False as the API token middleware was not playing nice with the JSON token auth. If you're not using auth0 auth (and are using tokens issued by the backend itself), you don't want to set USE_AUTH0=True.

Will also re-review the getting started guide and see if I can clean up the instructions.

@JSv4 JSv4 added the bug Something isn't working label Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants