Comments (10)
FIrst, you can double check that you are using the same credentials as in your env-backend.env
file
FIRST_SUPERUSER=email
FIRST_SUPERUSER_PASSWORD=password
If everything is correct, you can then check that your credentials are in the DB (you can login to pgadmin in order to do so, then add the DB server and connect to it, and finally drill down to the user table)
from full-stack-fastapi-postgresql.
Verified credentials I'm using are same as in env-backend.env
I'm running this on a remote server. I have opened all of the ports on the firewall. I am unable to access any of the pages listed in the readme except the front-end production login page.
I have the @ entry in my dns pointing to the servers ip.
from full-stack-fastapi-postgresql.
How have you deployed the stack on your remote server ?
from full-stack-fastapi-postgresql.
I ran the entire process on the remote server.
from full-stack-fastapi-postgresql.
Thanks for your help @ebreton !
@jerodg can you see yourdomain/docs
? If not, check the backend
logs.
If you can see the docs page, login there (before trying to log in in the frontend). That way you are debugging fewer parts and isolating the problem.
from full-stack-fastapi-postgresql.
I want to chime in on this one.
I run everything locally and I am able to navigate to localhost:8080 for front-end or localhost:8080/docs . Both do not login with the credentials specified in cookiecutter. Also I am able to navigate to localhost:5050 for pgAdmin, but not able to login with any specified password / user. Both frontend and pgadmin say they don't have my specified user in the system, when i go to recover password
.
How do I debug this @tiangolo ?
from full-stack-fastapi-postgresql.
@j3cc check if you can authorize yourself in the /docs
page. If you can - then its probably frontend issue. Check console for any CORS related errors.
Check if both ./.env
and ./backend/.env
files have consistent domain. Of course, make sure it matches with your browser address bar -- I had set it to dev.myapp.com
while accessing myapp.com
.
Also check the documentation about CORS headers in the generated repository -- Chrome doesn't play nicely with localhost
and CORS headers.
from full-stack-fastapi-postgresql.
I can log in everywhere but the frontend. It is the first superuser and first superuser password, right? I couldn't log in either in Chrome or Firefox, and when I try to get it to email me my password, it says my user doesn't exist. I'm sorry, I don't know much about this kind of thing, can anyone point me in the right direction?
Looking in the console, I get
Access to XMLHttpRequest at 'http://localhost/api/v1/users/me' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I tried both origins = []
and origins = ['*']
in main.py
Okay, manually changing the files as described here fixed it #45
from full-stack-fastapi-postgresql.
Thanks for the thorough explanation @wadkar !
The best way to debug things is to first isolate the problem, check if it's in the backend or in the frontend.
Try to login only in the /docs
, without using the frontend. If that doesn't work, you know there's a problem in the backend that you have to solve first. Then try to login in the frontend. If that doesn't work (and the backend does work), then there's a problem in the frontend. But the first step is to isolate the problem.
from full-stack-fastapi-postgresql.
Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.
from full-stack-fastapi-postgresql.
Related Issues (20)
- How to start the backend server without using docker?
- FASTAPI
- 🐛 Error in frontend when resetting a password: "The passwords do not match" HOT 1
- AttributeError: module 'app.db.engine' has no attribute '_run_ddl_visitor' HOT 1
- How can I override my JWT auth dependency in the endponits in FastAPI testing?
- How do I get this running on local? HOT 3
- Deploying on a machine with nginx HOT 1
- Why React, not Vue?
- Mac M1 Docker error HOT 4
- Bad Gateway returned HOT 3
- [Improvement] Replace Prettier and Eslint with Biome and add pre-commit hooks HOT 1
- Feature Request: Support for GitHub Codespaces Deployment and Development HOT 2
- Login error in Dashboard HOT 5
- Secrets should not be versioned by default HOT 3
- Enable discussion on this repo? HOT 1
- Support the use of dev containers for reproducible dev environment HOT 1
- Embracing Technological Evolution: A Journey Toward Innovation
- Debug Launch Configuration for "Debug Frontend: (...)" does not work on WSL
- Z
- Running task 1 of 1: python .copier/update_dotenv.py /bin/sh: 1: python: not found HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from full-stack-fastapi-postgresql.