statgen/bravo_api

Track user authentications in application backend.

Closed this issue · 2 comments

Issue or current state

User engagement, specifically logins per month and day, is tracked via google analytics. Managing credentials and hand off of the account responsible for this is a moving part that has been missed in the past.

Resolved when

Successful user authentications are logged by the application and retained for at least three months.

Closed by 7922c5f

def log_auth(self, user):
entry = {'user_id': user.get_id(), 'timestamp': datetime.now()}
mongo.db.auth_log.insert_one(entry)