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

set last_login on login #8201

Merged
merged 2 commits into from
Aug 24, 2023
Merged

set last_login on login #8201

merged 2 commits into from
Aug 24, 2023

Conversation

mekarpeles
Copy link
Member

Closes #8179

In ~2016 or 2017 when we switched from Open Library authentication to archive.org auth via the xauthn bridge, we somehow dropped a codepath which set/updated the last_login value on the patron's Open Library account. This adds back a last_login set in the audit authentication path.

Technical

Testing

Minimal test:

import web
import infogami
from openlibrary.config import load_config
load_config('/olsystem/etc/openlibrary.yml')
infogami._setup()
from infogami import config;
a = OpenLibraryAccount.get(email='michael.karpeles@gmail.com')
a['last_login'] = '2023-08-17T08:22:28.788221'  # for example
a._save()

Screenshot

Stakeholders

@jimchamp

Copy link
Collaborator

@jimchamp jimchamp left a comment

Choose a reason for hiding this comment

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

This is causing errors and preventing me from logging in.

@mekarpeles mekarpeles added Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] Priority: 2 Important, as time permits. [managed] labels Aug 22, 2023
@mekarpeles mekarpeles added On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing and removed Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] labels Aug 22, 2023
@jimchamp jimchamp merged commit ef4a20f into master Aug 24, 2023
@jimchamp jimchamp removed the On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 2 Important, as time permits. [managed]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

last_login field broken since xauthn
2 participants