question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

You have multiple authentication backends configured and therefore must provide the `backend` argument or set the `backend` attribute on the user.

See original GitHub issue

I get this error when trying to activate a new user from verification code:

You have multiple authentication backends configured and therefore must provide the backendargument or set thebackend attribute on the user.

I’ve updated my activate function to specify the default authentication channel but still no luck:

def activate(request, uidb64, token, backend='django.contrib.auth.backends.ModelBackend'):

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

14reactions
gregorvolkmanncommented, Apr 22, 2019

@omab, correct! Solved it by dropping authenticate() and taking the user from my form:

if form.is_valid():
    user = form.save()
    login(request, user, backend='django.contrib.auth.backends.ModelBackend')
0reactions
pupattancommented, Sep 15, 2020

I am also facing the same issue . Any update ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

multiple authentication backends configured and therefore ...
I found the solution. call login() with backend argument like login(request, user, backend='django.contrib.auth.backends.ModelBackend').
Read more >
Django : multiple authentication backends configured and ...
Django : multiple authentication backends configured and therefore must provide the ` backend ` argument or set the ` backend ` attribute on...
Read more >
#27891 (Allow setting a login backend when using ...
You have multiple authentication backends configured and therefore must provide the backend argument or set the backend attribute on the user.
Read more >
[Django] #27891: Allow to set a login backend when using ...
''You have multiple authentication backends configured and therefore must provide the `backend` argument or set the `backend` attribute on the user.''.
Read more >
Django Multiple Authentication Backends Based On Status ...
Since the authentication backend is used by Django to get the user object, it is not known at the time we're calling the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found