-
Notifications
You must be signed in to change notification settings - Fork 61
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
Added support for storing IP addresses at login #197
base: master
Are you sure you want to change the base?
Conversation
@@ -27,6 +27,18 @@ def save(self): | |||
db.commit() | |||
|
|||
|
|||
class IPAddress(base): | |||
__tablename__ = "ip_addresses" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The table name should be something more along the lines of user_logins
or something of that nature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have the login table in PR #186. Let me know which names you prefer for what
id = Column(Integer, primary_key=True, autoincrement=True) | ||
address = Column(String(45), nullable=False) | ||
account_id = Column(Integer, nullable=True) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not storing the seen_at
time that the logins are occurring which makes the logs less useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are storing the time already in another table in PR #186, let me know if you want aswell another timestamp in this table too. I tought it was not usefull to store two times the same info, we can just join the two tables and we get the same result
IP addresses are now being logged to database and associated to each account is logged.
This Issue #128 should be resolved now