Closed martarho closed 2 years ago
I'd assume that either marta@my-domain.com
or local_admin@my-domain.com
exists and is an active user with is_staff=True
?
Did you add authlib.backends.EmailBackend
to AUTHENTICATION_BACKENDS
? The default django.contrib.auth.backends.ModelBackend
doesn't support authenticating using only an email address.
Well, I guess I missed on the authlib.backends.EmailBackend
line :) Sorry! Will close this issue.
Thanks again for your help, @matthiask !
Great!
You're welcome :)
I guess I must continue my quest to get SSO set up :)
Unfortunately it seems I still can't get it to work. I tried creating users as I intend to do (no password) as well as with password - neither of them get to log in. The error is "No matching staff users for email address 'marta@my-domain.com'
I tested it a bit and the problem seems to be on this line: https://github.com/matthiask/django-authlib/blob/80fb597a4b721c5a7590a6b84a3fbd547953cc5f/authlib/admin_oauth/views.py#L41
user_mail
has the correct value, butuser
is set toNone
.My app set up:
User model under a specific django app (core)
core/models.py
core/managers.py