Coder Social home page Coder Social logo

Comments (10)

ebreton avatar ebreton commented on May 4, 2024

FIrst, you can double check that you are using the same credentials as in your env-backend.envfile

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.

jerodg avatar jerodg commented on May 4, 2024

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.

ebreton avatar ebreton commented on May 4, 2024

How have you deployed the stack on your remote server ?

from full-stack-fastapi-postgresql.

jerodg avatar jerodg commented on May 4, 2024

I ran the entire process on the remote server.

from full-stack-fastapi-postgresql.

tiangolo avatar tiangolo commented on May 4, 2024

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.

j3cc avatar j3cc commented on May 4, 2024

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.

wadkar avatar wadkar commented on May 4, 2024

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

jmugan avatar jmugan commented on May 4, 2024

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.

tiangolo avatar tiangolo commented on May 4, 2024

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.

github-actions avatar github-actions commented on May 4, 2024

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)

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.