Skip to content
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

Flask login #18

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Flask login #18

wants to merge 12 commits into from

Conversation

bnorquist
Copy link
Owner

@bnorquist bnorquist commented Sep 22, 2019

  • Adds login and signup routes and placeholders for delete account and reset password
  • make gunicorn reload on code changes automatically
  • update readme with new repo info

todo:

  • will need to set SECRET_KEY in production environment for this to work python -c 'import os; print(os.urandom(16))' to generate one
  • integration tests only work when there is a database available i.e. in docker environment. Suppressing for now, we can figure out how to set up a test db on CI later

@bnorquist
Copy link
Owner Author

@ifed3

@bnorquist bnorquist requested a review from ifed3 September 22, 2019 22:18
api/.gitignore Show resolved Hide resolved
api/app/routes/auth.py Outdated Show resolved Hide resolved
return AuthResponse("Username or Password was incorrect"), 404

login_user(user)
return AuthResponse(message="logged in"), 200
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bnorquist, which syntax do you want to use? I see a mixture of

AuthResponse('Username or Password was incorrect')
AuthResponse(message='logged in')

Let's standardize

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bnorquist this mixture is still across the codebase, which syntax do you prefer?

api/app/models/user.py Outdated Show resolved Hide resolved
api/app/routes/auth.py Outdated Show resolved Hide resolved
api/app/routes/auth.py Outdated Show resolved Hide resolved
api/app/__init__.py Outdated Show resolved Hide resolved
api/tests/conftest.py Outdated Show resolved Hide resolved
api/app/__init__.py Show resolved Hide resolved
api/app/models/flask_config.py Outdated Show resolved Hide resolved
else:
config = DevelopmentConfig()
# initialize dev database here?
environment = os.environ.get("ENVIRONMENT")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bnorquist, this is ready to be merged in but I think once you stashed the changes you also removed changing this from ENVIRONMENT to FLASK_ENV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants