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

Last login not updated #15

Closed
hgezim opened this issue Aug 29, 2018 · 3 comments
Closed

Last login not updated #15

hgezim opened this issue Aug 29, 2018 · 3 comments

Comments

@hgezim
Copy link

hgezim commented Aug 29, 2018

It appears that last login field is not updated at all when magic link is used to auth.

@aaugustin
Copy link
Owner

Django updates the last_login field when the user_logged_in signal is sent. That signal is sent by the django.contrib.auth.login() function which django-sesame calls here.

Is sesame.middleware.AuthenticationMiddleware after django.contrib.sessions.middleware.SessionMiddleware and django.contrib.auth.middleware.AuthenticationMiddleware in your MIDDLEWARE setting?

@hgezim
Copy link
Author

hgezim commented Sep 4, 2018

Yes, indeed, I do have them in that order:

    'django.contrib.sessions.middleware.SessionMiddleware',
    ...,
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'sesame.middleware.AuthenticationMiddleware',
    ...

@hgezim
Copy link
Author

hgezim commented Sep 4, 2018

Never mind! It's not an issue after-all.

@hgezim hgezim closed this as completed Sep 4, 2018
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

No branches or pull requests

2 participants